Skip to content

Commit 0581b89

Browse files
committed
modify version again...
1 parent 93dc1ee commit 0581b89

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csproj

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
<!-- Keep the MSIX version in sync with the PowerToys version -->
1313
<AppxPackageVersion>$(Version)</AppxPackageVersion>
1414
<ApplicationDisplayVersion>$(Version)</ApplicationDisplayVersion>
15-
<VersionMajor>$([System.Version]::Parse($(Version)).Major)</VersionMajor>
16-
<VersionMinor>$([System.Version]::Parse($(Version)).Minor)</VersionMinor>
17-
<VersionBuild>$([System.Version]::Parse($(Version)).Build)</VersionBuild>
18-
<VersionRevision>0</VersionRevision>
19-
<ApplicationVersion>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</ApplicationVersion>
2015
<EnableMsixTooling>true</EnableMsixTooling>
2116
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\WinUI3Apps\CmdPalExtensions\$(MSBuildProjectName)\</OutputPath>
2217
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@@ -85,4 +80,15 @@
8580
<PublishTrimmed>true</PublishTrimmed>
8681
<DisableRuntimeMarshalling>false</DisableRuntimeMarshalling>
8782
</PropertyGroup>
83+
84+
<Target Name="ForcePowerToysVersion" BeforeTargets="PrepareForBuild;Build;BeforeBuild;GenerateAppxPackage;GenerateAppxManifest">
85+
<PropertyGroup>
86+
<VersionMajor>$([System.Version]::Parse($(Version)).Major)</VersionMajor>
87+
<VersionMinor>$([System.Version]::Parse($(Version)).Minor)</VersionMinor>
88+
<VersionBuild>$([System.Version]::Parse($(Version)).Build)</VersionBuild>
89+
<VersionRevision>0</VersionRevision>
90+
<AppxPackageVersion>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</AppxPackageVersion>
91+
<PackageVersion>$(AppxPackageVersion)</PackageVersion>
92+
</PropertyGroup>
93+
</Target>
8894
</Project>

0 commit comments

Comments
 (0)