"dotnet publish -o obj/foo" does not respect output parameter
See original GitHub issueI found that when passing an explicit output path to the dotnet publish
task, the task modifies the output path by appending the projectFileName on the end (see getModifiedOutputForProjectFile). This is unexpected and makes it hard to chain commands together when left “guessing” what the output path will actually be.
Expected behavior: If an explicit output path is specified, it should be left untouched
Actual behavior: The projectFileName is appended to the output path.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Dotnet publish output parameter doesn't work #8309 - GitHub
The problem is that the parameter is interpreted relative to the project, not to the working directory you call this command from. same...
Read more >dotnet publish with absolute path do not respect output
I created some asp net core web app with razor pages. Now I would like to publish it to directory. dotnet publish -o...
Read more >dotnet publish command - .NET CLI - Microsoft Learn
The dotnet publish command's output is ready for deployment to a hosting ... The -c and -o parameters map to MSBuild's Configuration and ......
Read more >GN Reference - Google Git
gn args <out_dir> Open the arguments for the given build directory in an editor. If the given build directory doesn't exist, it will...
Read more >dotnet publish command does not accept workingDirectory or ...
The publish command does not properly accept a workingDirectory or projects parameter so you can only specify a single project.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve given up on the Dotnet Core tasks, and just used a simple command task
With 2.0 version of the task, now there is an option to not change the default behavior by appending the container path. With this control is in user’s hands. The reason for still having the option to preserve the old behavior is that the task can work with multiple projects. In such a case, if an ouput path is provided, this behavior lets you have cleanly publish all of them.