Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error, warn, or fix behavior when specifying output path when building a solution #15607

Closed
dsplaisted opened this issue Feb 2, 2021 · 5 comments

Comments

@dsplaisted
Copy link
Member

Specifying the output path (commonly by using the -o command line option to dotnet build or dotnet publish) when building or publishing a solution can lead to issues, as multiple projects building to the same path may override each other's files.

We should either block specifying the output path for a solution, or do something to fix the behavior (for example by appending the project name to the specified output path for each project).

Related:

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Feb 2, 2021
@dotnet-issue-labeler
Copy link

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.

@ericstj
Copy link
Member

ericstj commented Oct 12, 2022

@dsplaisted @marcpopMSFT this should be prioritized. In the past month I've observed multiple teams hit this issue and spend a tremendous amount of time chasing down the source of the binclash / wrong binaries in the output.

@dsplaisted
Copy link
Member Author

@ericstj Can you link the examples of where people have hit this if you have them?

Related: dotnet/msbuild#3497

@ericstj
Copy link
Member

ericstj commented Oct 17, 2022

One case is linked above: dotnet/runtime#75086. The other was an internal request which I just forwarded. I'm pretty sure this has also come up on the .NET discussion alias a few times.

@dsplaisted
Copy link
Member Author

This will be fixed in 7.0.200 (by erroring when you use the --output parameter for solution files).

cosinekitty added a commit to cosinekitty/astronomy that referenced this issue Feb 19, 2023
…les.

The `dotnet` command no longer allows using `--output` to specify the
output directory for building a solution file:
dotnet/sdk#15607

This broke my GitHub Actions tests for C#.

I used the following workaround, because in my case I
know merging multiple builds into one directory is safe:
dotnet/sdk#30624 (comment)
Jericho added a commit to Jericho/RefreshResources that referenced this issue Feb 22, 2023
…s specify output location when building solution

.NET sdk has introduced this change to avoid multiple binary files in a given solution from overwriting each other in the specified output location. Mode details: dotnet/sdk#15607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants