Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Emit $(DefineConstants);RELEASE for release configuration.

See original GitHub issue

Today, as part of migration we have to emit the following:

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

srivatsncommented, Dec 16, 2016

We already define DEBUG so I don’t know why we wouldn’t define RELEASE. Probably just an oversight.

nguerreracommented, Dec 16, 2016

I’m fine with it. Do we want a magic define based on configuration as with target framework?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found