4
votes

I want to know if their is any tag to set the output path of the dotnet publish within the .csproj-file. I know I can use something along the lines of publish "someproject.csproj" --output "..\mypubfolder" from the command line. But I want to specify a (default) publish folder within the .csproj-file

1

1 Answers

6
votes

You can set the PublishDir property which is used for the Publish target:

<PropertyGroup>
  <PublishDir>..\mypubfolder</PublishDir>
</PropertyGroup>