Solution build configurations ignored when using "dotnet build" and "dotnet run" #10336
-
Hi, sorry if this is the wrong place to ask. In our project's solution file we have more than the usual Debug & Release configurations, we also have "Tools" and "DebugOpt". These configurations are however exclusive to the main code of our project (so not used for any analyzers we also have in-tree). This means the solution config looks like this. Most things use "Tools" but some configurations are set to "Release": This works fine, however I just discovered that This causes loud compilation failures in our project on default config, but I am more concerned in general about the implications of this. It means that every time somebody uses is there anything I can specify here so that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I can think of the following approaches, ordered by descending preference:
|
Beta Was this translation helpful? Give feedback.
-
The core problem here is that solution configurations are used only when building in the context of a solution, while For |
Beta Was this translation helpful? Give feedback.
I can think of the following approaches, ordered by descending preference:
SetConfiguration
metadata to theProjectReference
item, to choose a configuration that is supported by the referenced project. Common MSBuild project items