Skip to content
This repository was archived by the owner on Oct 31, 2021. It is now read-only.

User Defined Compile Time constants #25

@dbwz8

Description

@dbwz8

Ok, I decided to just sprout this as a new issue (since everything I've tried doesn't work, and we're completely blocked at this point).

AFAICT, the .xproj file should support: in the Globals PropertyGroup. It's ignored.

However, the Project.json file appears to be the right place and should support define (according to online docs):

  "compilationOptions": {
     "optimize": true,
     "emitEntryPoint": true,
     "define": ["TRUE","PORTABLE"]
  },

It's ignored.

The other approach is to put it in a configuration:

  "configurations": {
    "Debug": {
      "compilationOptions": {
        "define": ["DEBUG", "TRACE", "TRUE","PORTABLE"]
      }
    },
    "Release": {
      "compilationOptions": {
        "define": ["RELEASE", "TRACE", "TRUE","PORTABLE"],
        "optimize": true
      }
    }
  },

but that's also ignore.is also ignored.

Is this expected at this time, or am I doing something wrong?

For sanity checking, I added some compile time warnings to the code and then turned on warningsAsErrors in both of the last two examples... made no difference, so my guess is that these sections are being completely ignored at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions