sdk: `PublishProfileFullPath` is ignored in `dotnet publish` command.

Hi team,

I have:

  1. Created a new .NET Core 3.1 console application on my Windows 10 with .NET SDK 3.1.402.
  2. Executed the following command: dotnet publish -p:PublishProfileFullPath=WhateverHere
  3. Publishing succeeded.

The issue is that specified PublishProfileFullPath (docs) is invalid and dotnet publish is fine with that.

Note: WhateverHere can be really whatever. An existing path, not existing path, not path at all.

Could anybody help me understand why is that?

Cheers!

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 30 (15 by maintainers)

Most upvoted comments

In your csproj, if the first line contains “Microsoft.NET.SDK.Web”, then you are using the websdk that contains the fallback.

Got it. Ok. I’ll add this item to our backlog

Our recommendation has been to use the publishprofile property. You just have to give the name of the profile and this will automatically resolve the extension and the correct path automatically.

dotnet publish WebApplication.csproj /p:PublishProfile=<FolderProfile>