Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<SelfContained>true</SelfContained>
<Platform>x64</Platform>
<ProductVersion Condition="'$(ProductVersion)' == ''">0.0.0</ProductVersion>
<DefineConstants>ProductVersion=$(ProductVersion)</DefineConstants>
<!-- Distributed installer file name: "AgentControl-{version}.msi" rather than the
default project-name-derived "DemaConsulting.AgentControl.Msi.msi". MsiPackageVersion
is deliberately a custom property name (not the well-known "Version"/"ProductVersion"
Expand All @@ -33,6 +32,11 @@
command-line /property:TargetName=, keeps the rename scoped to this project only). -->
<MsiPackageVersion Condition="'$(MsiPackageVersion)' == ''">$(ProductVersion)</MsiPackageVersion>
<TargetName>AgentControl-$(MsiPackageVersion)</TargetName>
<!-- Exposes both versions to Package.wxs: ProductVersion (numeric-only, ICE24-safe) drives
the MSI's actual Package/@Version, while MsiPackageVersion (the full semver, including
any pre-release suffix like "-beta.1") drives the separate ARPDISPLAYVERSION property so
Add/Remove Programs shows the real release version rather than the ICE24-stripped one. -->
<DefineConstants>ProductVersion=$(ProductVersion);MsiPackageVersion=$(MsiPackageVersion)</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -107,7 +111,7 @@
(an even count, which argv parsing resolves to one literal backslash plus a real,
unescaped closing quote) so BaseIntermediateOutputPath/BaseOutputPath still end in a
proper path separator for the SDK's own path concatenation. -->
<Exec Command="dotnet publish &quot;$(AgentControlProjectDir)DemaConsulting.AgentControl.csproj&quot; --configuration $(Configuration) --runtime win-x64 --self-contained true --output &quot;$(AgentControlPublishDir.TrimEnd('\'))&quot; -p:BaseIntermediateOutputPath=&quot;$(AgentControlIsolatedObj.TrimEnd('\'))\\&quot; -p:BaseOutputPath=&quot;$(AgentControlIsolatedBin.TrimEnd('\'))\\&quot; /nodeReuse:false" />
<Exec Command="dotnet publish &quot;$(AgentControlProjectDir)DemaConsulting.AgentControl.csproj&quot; --configuration $(Configuration) --runtime win-x64 --self-contained true --output &quot;$(AgentControlPublishDir.TrimEnd('\'))&quot; -p:BaseIntermediateOutputPath=&quot;$(AgentControlIsolatedObj.TrimEnd('\'))\\&quot; -p:BaseOutputPath=&quot;$(AgentControlIsolatedBin.TrimEnd('\'))\\&quot; -p:Version=$(MsiPackageVersion) /nodeReuse:false" />
</Target>

<!-- Note: the isolation mechanism above (dedicated obj/bin/publish folders plus
Expand Down
9 changes: 9 additions & 0 deletions src/DemaConsulting.AgentControl.Msi/Package.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@

<MajorUpgrade DowngradeErrorMessage="A newer version of AgentControl is already installed." />

<!-- Windows Installer requires Package/@Version (ProductVersion) to be strictly numeric
"major.minor.build" (ICE24), so any semver pre-release suffix (e.g. "-beta.1") is
stripped before it reaches here (see build.yaml's "Compute MSI-safe ProductVersion"
step). ARPDISPLAYVERSION is the standard MSI property that overrides only the version
string shown in "Add or Remove Programs", independent of the numeric ProductVersion, so
users see the real release version (including any pre-release suffix) there instead of
the silently-stripped one. -->
<Property Id="ARPDISPLAYVERSION" Value="$(MsiPackageVersion)" />

<!-- Embed all generated cabinets directly into the .msi so the installer is a single,
self-contained file - without this, WiX's default splits the published payload into
external cab1.cab/cab2.cab/... files that must be shipped alongside the .msi for
Expand Down
Loading