dotnet CLI '--configuration' option normalizes 'release' argument to 'Release' if ran on solution, but does not do that if ran on project
See original GitHub issuerunning dotnet build -c release <myfile>.sln
will produce dlls in <project path>/bin/Release/
but
running dotnet build -c release <myfile>.csproj
will produce dlls in <project path>/bin/release/
The use case problem is that in the latest SDK RID can not be specified on solution level - so projects should be built one-by-one, but dotnet test
still can be ran for the whole solution. So if you build all projects with dotnet build -c release <project>.csproj
and then try dotnet test -c release <solution>.sln
it will fail to locate dlls.
dotnet version 3.1.403 msbuild version 16.7.0+7fb82e5b2 OS official mcr dotnet core image on 3.1-alpine: Linux c53f91ba3edd 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 Linux
https://github.com/lGSMl/dotnet-issue-showcase/runs/1865106137
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks, this helps a lot. I had access to view the build output.
I’m able to repro this now locally. I suspect what’s happening is that when using the .sln file, the configurations values are always defined as “Debug” or “Release” and it then passes that as the
$(Configuration)
, which will be problematic for something like Linux.