Skip to content

Commit e1e676b

Browse files
committed
Insert packageVersion into OutputName when available
1 parent d624aaf commit e1e676b

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/Installers/Windows/SharedFramework/SharedFramework.wixproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
44

55
<PropertyGroup>
6-
<!-- Everything built in this project _except_ the final package & MSI are shipping assets. -->
7-
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
8-
<_GeneratedPackageVersion
9-
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
10-
<PackageFileName>$(RuntimeInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
6+
<OutputNamePrefix>$(RuntimeInstallerBaseName)-</OutputNamePrefix>
7+
<OutputNameSuffix>-win-$(Platform)</OutputNameSuffix>
118
<ProductNameFolder>Microsoft ASP.NET Core Shared Framework</ProductNameFolder>
129
<ProductNameShort>AspNetCore.SharedFramework</ProductNameShort>
13-
<OutputName>$(PackageFileName)</OutputName>
1410
<OutputType>Package</OutputType>
1511
<EmbedCab>yes</EmbedCab>
1612
<Cabinet>sfx_$(Platform).cab</Cabinet>
@@ -84,6 +80,7 @@
8480
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
8581

8682
<PropertyGroup>
83+
<PackageFileName>$(OutputName)</PackageFileName>
8784
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Shared Framework ($(Platform))</ProductName>
8885
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
8986
</PropertyGroup>

src/Installers/Windows/TargetingPack/TargetingPack.wixproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
44

55
<PropertyGroup>
6-
<!-- Everything built in this project _except_ the final package are shipping assets. -->
7-
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
8-
<_GeneratedPackageVersion
9-
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
6+
<OutputNamePrefix>$(TargetingPackInstallerBaseName)-</OutputNamePrefix>
7+
<OutputNameSuffix>-win-$(Platform)</OutputNameSuffix>
108
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Targeting Pack ($(Platform))</ProductName>
11-
<PackageFileName>$(TargetingPackInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
129
<ProductNameFolder>Microsoft ASP.NET Core Targeting Pack</ProductNameFolder>
1310
<ProductNameShort>AspNetCore.TargetingPack</ProductNameShort>
14-
<OutputName>$(PackageFileName)</OutputName>
1511
<OutputType>Package</OutputType>
1612
<IsShipping>true</IsShipping>
1713
<SkipCopyToArtifactsDirectory Condition="'$(IsTargetingPackBuilding)' == 'false'">true</SkipCopyToArtifactsDirectory>
@@ -75,6 +71,7 @@
7571
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
7672

7773
<PropertyGroup>
74+
<PackageFileName>$(OutputName)</PackageFileName>
7875
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
7976

8077
<!-- Suppresses building this project completely during servicing builds. -->

src/Installers/Windows/Wix.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
<InstallDir>$(ProductName)</InstallDir>
2424
<DepProviderKey>Microsoft.$(ProductNameShort)_$(Platform)_$(Lang),v$(PackageVersion)</DepProviderKey>
2525
<DefineConstants>$(DefineConstants);DepProviderKey=$(DepProviderKey)</DefineConstants>
26+
<!-- Set package version for SharedFx & TargetingPack wixproj's -->
27+
<!-- Everything built in those projects _except_ the final package & MSI are shipping assets. -->
28+
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
29+
<_GeneratedPackageVersion
30+
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
31+
<!-- Insert PackageVersion into OutputName for SharedFx & TargetingPack -->
32+
<OutputName Condition="'$(OutputNamePrefix)' != '' AND '$(OutputNameSuffix)' != ''">$(OutputNamePrefix)$(_GeneratedPackageVersion)$(OutputNameSuffix)$(TargetExt)</OutputName>
2633
</PropertyGroup>
2734

2835
<PropertyGroup>

0 commit comments

Comments
 (0)