1

Trying to publish an app from the command line and its not deleting existing files in the destination directory before publishing.

Here is the command:

dotnet publish "myproject.csproj" /p:Configuration=Release /p:PublishProfile=FolderProfile

FolderProfile is the profile I am using in Visual Studio which works when run from VS. When run from the CLI it publishes just as expected, but doesn't wipe the destination directory first like VS does. Am I missing something?

Here is the publish profile view in VS:

enter image description here

And here is the publish profile edit window:

enter image description here

UPDATE: It seems that property is ignored when running from dotnet publish:

dotnet publish with /p:PublishProfile=?

https://github.com/dotnet/sdk/issues/12490#issuecomment-1085139911

mxmissile
  • 11,464
  • 3
  • 53
  • 79

0 Answers0