Conversation
- Configure single-file publishing for Windows - Add self-contained deployment options - Create ClickOnce publish profile - Support automatic updates Closes #2
There was a problem hiding this comment.
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.
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$([MSBuild]::IsOSPlatform(Windows))' == 'true'"> | ||
| <PublishSingleFile>true</PublishSingleFile> | ||
| <SelfContained>true</SelfContained> | ||
| <RuntimeIdentifier>win-x64</RuntimeIdentifier> |
There was a problem hiding this comment.
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.
| </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> |
| <PublishSingleFile>true</PublishSingleFile> | ||
| <SelfContained>true</SelfContained> | ||
| <RuntimeIdentifier>win-x64</RuntimeIdentifier> | ||
| <PublishReadyToRun>true</PublishReadyToRun> | ||
| <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> |
There was a problem hiding this comment.
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.
Summary
Changes
BannerlordModEditor.UI/BannerlordModEditor.UI.csproj- Publishing configurationBannerlordModEditor.UI/Properties/PublishProfiles/ClickOnceProfile.pubxml- Publish profileCloses #2