Skip to content

Conversation

@softworkz
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 7, 2025 11:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MSBuild publish profile examples in the package building documentation to use the correct property names and structure for modern .NET publishing.

  • Updates obsolete MSBuild property names (e.g., PublishDirPublishUrl, PublishProtocolPublishProvider)
  • Adds missing publish profile properties (DeleteExistingFiles, WebPublishMethod, _TargetId, ProjectGuid)
  • Removes unnecessary properties from ASP.NET publish profiles (Configuration, Platform, PublishSingleFile)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AeonSake
Copy link

AeonSake commented Dec 7, 2025

Just a few notes from my testing with publish profiles:

  • ProjectGuid is not required
  • Configuration is required IF used in the dynamic PublishUrl property; alternatively you could also replace $(Configuration) with $(LastUsedBuildConfiguration)

@softworkz
Copy link
Collaborator Author

Just a few notes from my testing with publish profiles:

  • ProjectGuid is not required

Probably not, but I'm not sure about it. There is surely some reason why the publishing wizard adds it.

  • Configuration is required IF used in the dynamic PublishUrl property; alternatively you could also replace $(Configuration) with $(LastUsedBuildConfiguration)

This doesn't work when there's no LastUsedBuildConfiguration - e.g. when publishing a project for the first time or building on CI.

@AeonSake
Copy link

AeonSake commented Dec 7, 2025

  • Configuration is required IF used in the dynamic PublishUrl property; alternatively you could also replace $(Configuration) with $(LastUsedBuildConfiguration)

This doesn't work when there's no LastUsedBuildConfiguration - e.g. when publishing a project for the first time or building on CI.

Fair point; my point is that the publish profile itself doesn't work if no Configuration property is set in the profile itself for some reason (also the publishing path will be incorrect). Either that, or the LastUsedBuildConfiguration property must be set. Also, the interface in Visual Studio gets somewhat confused if the LastUsedBuildConfiguration and LastUsedPlatform properties are missing (the UI shows "Unknown" for those fields), but it works regardless.

@softworkz
Copy link
Collaborator Author

You are absolutely right: Configuration and Platform must be present.

I've updated this PR, thanks!

@softworkz
Copy link
Collaborator Author

This is included in the other PR now: #966

@softworkz softworkz closed this Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants