Skip to content

feat(#2): ClickOnce publishing support#54

Open
ModerRAS wants to merge 1 commit intomasterfrom
feature/issue-2-clickonce-publishing
Open

feat(#2): ClickOnce publishing support#54
ModerRAS wants to merge 1 commit intomasterfrom
feature/issue-2-clickonce-publishing

Conversation

@ModerRAS
Copy link
Copy Markdown
Contributor

Summary

  • Configure single-file publishing for Windows
  • Add self-contained deployment options
  • Create ClickOnce publish profile
  • Support automatic updates

Changes

  • BannerlordModEditor.UI/BannerlordModEditor.UI.csproj - Publishing configuration
  • BannerlordModEditor.UI/Properties/PublishProfiles/ClickOnceProfile.pubxml - Publish profile

Closes #2

- Configure single-file publishing for Windows
- Add self-contained deployment options
- Create ClickOnce publish profile
- Support automatic updates

Closes #2
Copilot AI review requested due to automatic review settings March 20, 2026 01:20
Copy link
Copy Markdown
Contributor

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

Adds Windows publishing configuration aimed at supporting ClickOnce deployment, including single-file/self-contained publish settings and a ClickOnce publish profile to enable installation and updates.

Changes:

  • Add Windows-specific publish properties (single-file, self-contained, RID, ReadyToRun) in the UI project file.
  • Add a ClickOnce publish profile for publishing/install/update workflow.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

File Description
BannerlordModEditor.UI/BannerlordModEditor.UI.csproj Adds Windows-gated publish properties for single-file, self-contained win-x64 output.
BannerlordModEditor.UI/Properties/PublishProfiles/ClickOnceProfile.pubxml Adds ClickOnce publish profile (not included in provided diff excerpt).

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

Comment on lines 12 to +17
</PropertyGroup>

<PropertyGroup Condition="'$([MSBuild]::IsOSPlatform(Windows))' == 'true'">
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Gating publish settings on the host OS (IsOSPlatform(Windows)) makes Windows packaging non-reproducible from non-Windows environments (e.g., CI on Linux building -r win-x64). Prefer conditioning on the target (e.g., $(RuntimeIdentifier)/$(TargetFramework)), or move these properties into the ClickOnce .pubxml so they apply when that profile is used regardless of the build agent OS.

Suggested change
</PropertyGroup>
<PropertyGroup Condition="'$([MSBuild]::IsOSPlatform(Windows))' == 'true'">
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +19
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

These are publish-profile-specific knobs (single-file/self-contained/RID/ReadyToRun). Defining them at the project level can unintentionally affect all publish modes on Windows and forces RID-specific restore/asset selection. Consider moving SelfContained, RuntimeIdentifier, and related publish settings into ClickOnceProfile.pubxml (or scoping them to that profile via conditions) so regular dev builds and other publish flows aren’t implicitly locked to win-x64/self-contained output.

Copilot uses AI. Check for mistakes.
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.

[Feature] ClickOnce发布

2 participants