Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 167c5b6

Browse files
committed
Add MSBuild redirects for CA projects
Fixes wixtoolset/issues#5511
1 parent 019272e commit 167c5b6

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

src/Votive2017/Votive2017.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,21 @@
3232
<InstallRoot>MSBuild</InstallRoot>
3333
<VSIXSubPath>Microsoft\WiX\v3.x\</VSIXSubPath>
3434
</Content>
35+
<Content Include="redirects\v3\wix.ca.targets">
36+
<IncludeInVSIX>true</IncludeInVSIX>
37+
<InstallRoot>MSBuild</InstallRoot>
38+
<VSIXSubPath>Microsoft\WiX\v3.x\</VSIXSubPath>
39+
</Content>
3540
<Content Include="redirects\v4\wix.targets">
3641
<IncludeInVSIX>true</IncludeInVSIX>
3742
<InstallRoot>MSBuild</InstallRoot>
3843
<VSIXSubPath>WiX Toolset\v4\</VSIXSubPath>
3944
</Content>
45+
<Content Include="redirects\v4\wix.ca.targets">
46+
<IncludeInVSIX>true</IncludeInVSIX>
47+
<InstallRoot>MSBuild</InstallRoot>
48+
<VSIXSubPath>WiX Toolset\v4\</VSIXSubPath>
49+
</Content>
4050
</ItemGroup>
4151

4252
<ItemGroup>
@@ -121,21 +131,17 @@
121131
<VSIXSubPath>.</VSIXSubPath>
122132
</Content>
123133
<Content Include="schemas\vs.xsd">
124-
125134
<InstallRoot>Schemas</InstallRoot>
126135
<IncludeInVSIX>true</IncludeInVSIX>
127136
<VSIXSubPath>.</VSIXSubPath>
128-
129137
</Content>
130138
<Content Include="schemas\wix.xsd">
131139
<VSIXSubPath>.</VSIXSubPath>
132-
133140
<InstallRoot>Schemas</InstallRoot>
134141
<IncludeInVSIX>true</IncludeInVSIX>
135142
</Content>
136143
<Content Include="schemas\wixloc.xsd">
137144
<VSIXSubPath>.</VSIXSubPath>
138-
139145
<InstallRoot>Schemas</InstallRoot>
140146
<IncludeInVSIX>true</IncludeInVSIX>
141147
</Content>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="EnsureActualWixToolsetInstalled" ToolsVersion="15.0">
4+
<PropertyGroup>
5+
<WixMSBuildFolder>$(MSBuildProgramFiles32)\MSBuild\Microsoft\WiX\v3.x\</WixMSBuildFolder>
6+
</PropertyGroup>
7+
8+
<Import Project="$(WixMSBuildFolder)wix.ca.targets" Condition=" Exists('$(WixMSBuildFolder)wix.ca.targets') " />
9+
<Target Name="EnsureActualWixToolsetInstalled" Condition=" !Exists('$(WixMSBuildFolder)wix.ca.targets') ">
10+
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. Could not find wix.ca.targets at '$(WixMSBuildFolder)'. To download WiX Toolset v3.11 (or newer), see http://wixtoolset.org/releases/" />
11+
</Target>
12+
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="EnsureActualWixToolsetInstalled" ToolsVersion="15.0">
4+
<PropertyGroup>
5+
<WixInstallFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\WiX Toolset\v4', 'InstallFolder', null, RegistryView.Registry32))</WixInstallFolder>
6+
</PropertyGroup>
7+
8+
<Import Project="$(WixInstallFolder)sdk\wix.ca.targets" Condition=" Exists('$(WixInstallFolder)sdk\wix.ca.targets') " />
9+
<Target Name="EnsureActualWixToolsetInstalled" Condition=" !Exists('$(WixInstallFolder)sdk\wix.ca.targets') ">
10+
<Error Text="The WiX Toolset v4 build tools must be installed to build this project. Could not find wix.ca.targets at '$(WixInstallFolder)sdk\'. To download WiX Toolset v4, see http://wixtoolset.org/releases/" />
11+
</Target>
12+
</Project>

0 commit comments

Comments
 (0)