dotnet publish -o does not work as expected
dotnet publish -o does not work as expected
I just updated a pretty large project to dotnet core 3 (3.0.100-preview8-013656). I have not had any issues at all until doing a dotnet publish. We publish to a folder like this.
dotnet publish -c Release -r linux-arm -o ../../build/linux-arm src/MyProject/MyProject.csproj
Before the update to dotnet core 3 we always got the result into the expected folder. Now it seems like -o is relative from the actual location and not the location of the .csproj as in previous versions of dotnet core.
Maybe this is intended? If so, you can close this issue.
OS: MacOS High Sierra
Edit: I should probably have reported this at https://github.com/dotnet/cli/issues :/
@livarcocc, @nguerrera - can you comment on the behavior @uffebjorklund is seeing?
Yes this was a breaking change made for 3.0 since before, -o ..\foo not being relative to the command location / current working directory was odd. Applies to some other commands as well.
https://github.com/dotnet/cli/pull/9892 You can blame me for implementing it, so sorry about breaking you.. (I knew this would happen but I still see people being confused over the pre 3.0 relative path behaviour, esp when you want to pack all packable projects in a solution to a common output directory, or publishing as what you did)
Thanks for explaining! Not really an issue, but I wanted to report it just in case it was not intended.