Emit $(DefineConstants);RELEASE for release configuration.
See original GitHub issueToday, as part of migration we have to emit the following:
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
We do that because project.json had this defineconstants in it, so, to keep the behavior the same for migrated projects, we have to emit it as well.
Would it be possible to emit this in SDK itself?
cc @dsplaisted
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (11 by maintainers)
Top Results From Across the Web
DefineConstants works with Run command, but not Build ...
1 Answer 1 · clean, restore, build (using the "Test" configuration) · clean, restore, build, run (with no configuration specified).
Read more >Common MSBuild Project Properties
List of common properties and parameters ; Configuration, All, The configuration that you're building, generally Debug or Release , but ...
Read more >When Element (MSBuild)
The example supposes the requirement is to set certain properties for debug and release builds, including the output folder based on the bitness...
Read more >Platform Conditional Compilation in .NET Core - Magnus Montin
In this particular case I want to build the app on Linux which is why I ... You use the docker run command...
Read more >Directory.Build.props - yesan/corefx
Need to set ProjectAssetsFile to something so it doesn't get set to the Tools.proj assets file when we import the generated props -->....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We already define DEBUG so I don’t know why we wouldn’t define RELEASE. Probably just an oversight.
I’m fine with it. Do we want a magic define based on configuration as with target framework?