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:
And here is the publish profile edit window:
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