question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"dotnet publish -o obj/foo" does not respect output parameter

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benc-ukcommented, May 9, 2017

I’ve given up on the Dotnet Core tasks, and just used a simple command task

0reactions
sachinmacommented, Sep 5, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found