Skip to content

Commit e2fed65

Browse files
Follow up on Wix 5 signing changes (#15995)
1 parent 0fbc9e8 commit e2fed65

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<!-- Keep Microsoft.Data.Services.Client package version in sync with Microsoft.Data.OData -->
1212
<MicrosoftDataServicesClientVersion>5.8.4</MicrosoftDataServicesClientVersion>
1313
<MicrosoftSignedWixVersion>3.14.1-9323.2545153</MicrosoftSignedWixVersion>
14-
<MicrosoftWixToolsetVersion>5.0.2-dotnet.2718840</MicrosoftWixToolsetVersion>
14+
<MicrosoftWixToolsetSdkVersion>5.0.2-dotnet.2737382</MicrosoftWixToolsetSdkVersion>
1515
<!-- Overwrite XUnitVersion/XUnitAnalyzersVersion/XUnitRunnerConsoleVersion/XUnitRunnerVisualStudioVersion that comes from the Arcade SDK to be in sync as Arcade doesn't use a live Arcade SDK.
1616
Keep in sync with DefaultVersions.props. -->
1717
<XUnitVersion>2.9.3</XUnitVersion>
@@ -95,7 +95,7 @@
9595
<PackageVersion Include="Microsoft.OpenApi" Version="1.3.2" />
9696
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.3.2" />
9797
<PackageVersion Include="Microsoft.Signed.Wix" Version="$(MicrosoftSignedWixVersion)" />
98-
<PackageVersion Include="Microsoft.WixToolset.Sdk" Version="$(MicrosoftWixToolsetVersion)" />
98+
<PackageVersion Include="Microsoft.WixToolset.Sdk" Version="$(MicrosoftWixToolsetSdkVersion)" />
9999
<PackageVersion Include="Microsoft.VisualStudio.OLE.Interop" Version="7.10.6071" />
100100
<PackageVersion Include="Mono.Options" Version="5.3.0.1" />
101101
<PackageVersion Include="Moq" Version="4.18.4" />

src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<MicrosoftManifestToolCrossPlatformVersion Condition="'$(MicrosoftManifestToolCrossPlatformVersion)' == ''">2.1.3</MicrosoftManifestToolCrossPlatformVersion>
9999
<MicrosoftVisualStudioEngMicroBuildPluginsSwixBuildVersion Condition="'$(MicrosoftVisualStudioEngMicroBuildPluginsSwixBuildVersion)' == ''">1.1.286</MicrosoftVisualStudioEngMicroBuildPluginsSwixBuildVersion>
100100
<MicrosoftSignedWixVersion Condition="'$(MicrosoftSignedWixVersion)' == ''">3.14.1-9323.2545153</MicrosoftSignedWixVersion>
101-
<MicrosoftWixToolsetVersion Condition="'$(MicrosoftWixToolsetVersion)' == ''">5.0.2-dotnet.2737382</MicrosoftWixToolsetVersion>
101+
<MicrosoftWixToolsetSdkVersion Condition="'$(MicrosoftWixToolsetSdkVersion)' == ''">5.0.2-dotnet.2737382</MicrosoftWixToolsetSdkVersion>
102102
</PropertyGroup>
103103

104104
<!-- RestoreSources overrides - defines DotNetRestoreSources variable if available -->

src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
SNBinaryPath="$(SNBinaryPath)"
9191
MicroBuildCorePath="$(NuGetPackageRoot)microsoft.visualstudioeng.microbuild.core\$(MicrosoftVisualStudioEngMicroBuildCoreVersion)"
9292
Wix3ToolsPath="$(WixInstallPath)"
93-
WixToolsPath="$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetVersion)\tools\net472\x64"
93+
WixToolsPath="$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\x64"
9494
TarToolPath="$(NuGetPackageRoot)microsoft.dotnet.tar\$(MicrosoftDotNetTarVersion)\tools\$(NetToolCurrent)\any\Microsoft.Dotnet.Tar.dll"
9595
PkgToolPath="$(PkgToolPath)"
9696
RepackParallelism="$(SignToolRepackParallelism)"

src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<PackageReference Include="MicroBuild.Core.Sentinel" Version="1.0.0" IsImplicitlyDefined="true" />
5151
<PackageReference Include="vswhere" Version="$(VSWhereVersion)" IsImplicitlyDefined="true" />
5252
<PackageReference Include="Microsoft.Signed.Wix" Version="$(MicrosoftSignedWixVersion)" IsImplicitlyDefined="true" />
53-
<PackageReference Include="Microsoft.WixToolset.Sdk" Version="$(MicrosoftWixToolsetVersion)" IsImplicitlyDefined="true" />
53+
<PackageReference Include="Microsoft.WixToolset.Sdk" Version="$(MicrosoftWixToolsetSdkVersion)" IsImplicitlyDefined="true" />
5454
<PackageReference Include="Microsoft.DotNet.SignTool" Version="$(MicrosoftDotNetSignToolVersion)" IsImplicitlyDefined="true" />
5555
<PackageReference Include="Microsoft.DotNet.Tar" Version="$(MicrosoftDotNetTarVersion)" IsImplicitlyDefined="true" />
5656
<PackageReference Include="Microsoft.DotNet.MacOsPkg.Cli" Version="$(MicrosoftDotNetMacOsPkgVersion)" IsImplicitlyDefined="true" />

src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateWixBuildWixpack.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414

1515
namespace Microsoft.DotNet.Build.Tasks.Installers
1616
{
17+
/*
18+
* This task creates a Wixpack package from the provided source files and configuration.
19+
* It processes the source files, copies necessary content files to a working directory,
20+
* updates paths and variables in source-files, and generates a command line file
21+
* for building the Wixpack. Content files get copied to a subfolder named after the File@Id
22+
* or similar unique value, based on the content element type.
23+
* We are including extensions in wixpack, which allows us to skip restoring these packages
24+
* and discover extension binaries during signing/repacking.
25+
* Finally, this task creates a zip package containing all the necessary files.
26+
* The task supports various configurations such as cultures, define constants, extensions,
27+
* include search paths, installer platform, output folder, and more.
28+
*/
1729
public class CreateWixBuildWixpack : Task
1830
{
1931
public ITaskItem BindTrackingFile { get; set; }
@@ -203,9 +215,9 @@ private void UpdatePaths()
203215
}
204216

205217
// Update ProjectPath to just the project file name
206-
if (_defineConstantsDictionary.ContainsKey("ProjectPath"))
218+
if (_defineConstantsDictionary.TryGetValue("ProjectPath", out var projectPath))
207219
{
208-
_defineConstantsDictionary["ProjectPath"] = Path.GetFileName(_defineConstantsDictionary["ProjectPath"]);
220+
_defineConstantsDictionary["ProjectPath"] = Path.GetFileName(projectPath);
209221
}
210222

211223
// Update OutDir to just '.''
@@ -221,9 +233,9 @@ private void UpdatePaths()
221233
}
222234

223235
// Update TargetPath to %outputfolder%\<target file name>
224-
if (_defineConstantsDictionary.ContainsKey("TargetPath"))
236+
if (_defineConstantsDictionary.TryGetValue("TargetPath", out var targetPath))
225237
{
226-
_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(_defineConstantsDictionary["TargetPath"]));
238+
_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath));
227239
}
228240

229241
// Update InstallerFile to %outputfolder%\<installer filename>

src/Microsoft.DotNet.SignTool.Tests/Microsoft.DotNet.SignTool.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
<ItemGroup>
3535
<PackageDownload Include="Microsoft.Signed.Wix" Version="[$(MicrosoftSignedWixVersion)]" />
36-
<PackageDownload Include="Microsoft.WixToolset.Sdk" Version="[$(MicrosoftWixToolsetVersion)]" />
36+
<PackageDownload Include="Microsoft.WixToolset.Sdk" Version="[$(MicrosoftWixToolsetSdkVersion)]" />
3737
<PackageDownload Include="sn" Version="[$(SNVersion)]" />
3838
</ItemGroup>
3939

@@ -43,7 +43,7 @@
4343
<Content Include="$(NuGetPackageRoot)microsoft.signed.wix\$(MicrosoftSignedWixVersion)\tools\**"
4444
CopyToOutputDirectory="Always"
4545
Link="tools\wix3\%(RecursiveDir)%(Filename)%(Extension)" />
46-
<Content Include="$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetVersion)\tools\**"
46+
<Content Include="$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\**"
4747
CopyToOutputDirectory="Always"
4848
Link="tools\wix\%(RecursiveDir)%(Filename)%(Extension)" />
4949

0 commit comments

Comments
 (0)