Open zlepper opened 3 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
This is not currently supported as cli properties are passed to the members of the solution but not to projects outside of the solution.
We have a project structure where we are running with 2 solution files. One solution file lists all projects, and are where we normally develop things. The other solution file only lists the main microservices that needs to be published. We do this to make it possible to use the
dotnet publish
command, and leverage proper parallel builds for all the microservices.Right now this works because dotnet also compiles all references csprojects, even if they aren't included in the solution file. There is a minor problem however that configuration, like
-c Release
is not passed along, resulting in the referenced projects not being compiled in release mode.I have attached a very small sample project that does this. Build it using the
build.cmd
file. Then go inspect thedotnet-sdk-bug\MyApp\bin\Release\net5.0\win-x64\publish\MyLibrary.dll
file with something like DotPeek. Notice how theConsole.WriteLine("I'm in debug mode");
is still included, even though the entire solution was compiled in release mode.dotnet-sdk-bug.zip