msbuild
msbuild copied to clipboard
DotNet build produces different result then building in visual studio
Description
I use the following commandline:
"C:\Program Files\dotnet\dotnet.exe" build MCC.sln --configuration Debug
if I do this, dotnet also copies the dlls of 2 projects wich are only "build dependecies" and not also refernences to the output directory.
Reproduction Steps
Download this sample: ConsoleApp1.zip
- build it with visual studio. In the Folder: ConsoleApp1\bin\Debug\net7.0 you only get the files of the console app.
- build it with dotnet build ConsoleApp1.sln you get both executables in the output
Expected behavior
- only the one exe should be in the output
Actual behavior
both exe files are copied
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries See info in area-owners.md if you want to be subscribed.
Issue Details
Description
I use the following commandline:
"C:\Program Files\dotnet\dotnet.exe" build MCC.sln --configuration Debug
if I do this, dotnet also copies the dlls of 2 projects wich are only "build dependecies" and not also refernences to the output directory.
Reproduction Steps
Download this sample: ConsoleApp1.zip
- buuld it with visual studio. In the Folder: ConsoleApp1\bin\Debug\net7.0 you only get the files of the console app.
- build it with dotnet build ConsoleApp1.sln you get both executables in the output
Expected behavior
- only the one exe should be in the output
Actual behavior
both exe files are copied
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
| Author: | jogibear9988 |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
@marcpopMSFT
For the particular issue this customer raised, that seems very much specific to their build rather than a bug so the person assigned would probably try to get some initial guidance on how to dig further and assign the milestone as discussion
sure? I added a sample... try build it with visual studio and dotnet and you get a different output
I was able to repro this and looked at the binlog. It looks like the AssignProjectConfiguration task is reading the dependency data from the solution and adding a project reference, which results in the output from the now-referenced project being included.
FYI @rainersigwald
is this also broken in net6, or is it a regression?
any news here?
Any News? It's now broken over a year?