1- <?xml version =" 1.0" encoding =" utf-8" ?>
2- <Project ToolsVersion =" 4.0" DefaultTargets =" Build" InitialTargets =" EnsureWixToolsetInstalled" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!--
3+ WiX v3 MSBuild project. Requires WiX Toolset v3.x to be installed.
4+ See https://wixtoolset.org/ to download WiX v3.
5+ For a standalone build (including harvesting), use buildmsi.ps1.
6+ -->
7+ <Project DefaultTargets =" Build" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion =" 4.0" >
38 <PropertyGroup >
49 <Configuration Condition =" '$(Configuration)' == '' " >Debug</Configuration >
510 <Platform Condition =" '$(Platform)' == '' " >x86</Platform >
611 <ProductVersion >3.10</ProductVersion >
7- <ProjectGuid >bbf5fda0-c08f-48c9-9b98-e017dd8abb5d</ProjectGuid >
812 <SchemaVersion >2.0</SchemaVersion >
9- <OutputName >Setup</ OutputName >
13+ <ProjectGuid >{BBF5FDA0-C08F-48C9-9B98-E017DD8ABB5D}</ ProjectGuid >
1014 <OutputType >Package</OutputType >
11- <RunPostBuildEvent >OnBuildSuccess</RunPostBuildEvent >
12- </PropertyGroup >
13- <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x86' " >
14- <OutputPath >bin\$(Platform)\$(Configuration)\</OutputPath >
15- <IntermediateOutputPath >obj\$(Configuration)\</IntermediateOutputPath >
16- <DefineConstants >Debug</DefineConstants >
15+ <OutputName >WorkloadTools</OutputName >
16+ <WixTargetsPath Condition =" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' " >$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath >
17+ <WixTargetsPath Condition =" '$(WixTargetsPath)' == '' " >$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath >
18+ <!-- Default version for local developer builds; buildmsi.ps1 always passes BuildVersion -->
19+ <BuildVersion Condition =" '$(BuildVersion)' == '' " >0.0.0.0</BuildVersion >
1720 </PropertyGroup >
1821 <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Release|x86' " >
19- <OutputPath >bin\$(Platform)\$(Configuration)\</OutputPath >
20- <IntermediateOutputPath >obj\$(Configuration)\</IntermediateOutputPath >
21- </PropertyGroup >
22- <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x64' " >
23- <DefineConstants >Debug</DefineConstants >
24- <OutputPath >bin\$(Platform)\$(Configuration)\</OutputPath >
25- <IntermediateOutputPath >obj\$(Platform)\$(Configuration)\</IntermediateOutputPath >
22+ <OutputPath >bin\x86\Release\</OutputPath >
23+ <IntermediateOutputPath >obj\x86\Release\</IntermediateOutputPath >
24+ <DefineConstants >BuildVersion=$(BuildVersion);Platform=$(Platform)</DefineConstants >
2625 </PropertyGroup >
2726 <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Release|x64' " >
28- <OutputPath >bin\$(Platform)\$(Configuration)\</OutputPath >
29- <IntermediateOutputPath >obj\$(Platform)\$(Configuration)\</IntermediateOutputPath >
27+ <OutputPath >bin\x64\Release\</OutputPath >
28+ <IntermediateOutputPath >obj\x64\Release\</IntermediateOutputPath >
29+ <DefineConstants >BuildVersion=$(BuildVersion);Platform=$(Platform)</DefineConstants >
30+ </PropertyGroup >
31+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x86' " >
32+ <OutputPath >bin\x86\Debug\</OutputPath >
33+ <IntermediateOutputPath >obj\x86\Debug\</IntermediateOutputPath >
34+ <DefineConstants >BuildVersion=$(BuildVersion);Platform=$(Platform)</DefineConstants >
35+ </PropertyGroup >
36+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x64' " >
37+ <OutputPath >bin\x64\Debug\</OutputPath >
38+ <IntermediateOutputPath >obj\x64\Debug\</IntermediateOutputPath >
39+ <DefineConstants >BuildVersion=$(BuildVersion);Platform=$(Platform)</DefineConstants >
3040 </PropertyGroup >
3141 <ItemGroup >
32- <Compile Include =" harvest.wxs" />
33- <Compile Include =" harvest2.wxs" />
3442 <Compile Include =" Product.wxs" />
35- </ItemGroup >
36- <ItemGroup >
37- <ProjectReference Include =" ..\ConvertWorkload\ConvertWorkload.csproj" >
38- <Name >ConvertWorkload</Name >
39- <Project >{62e37c03-ba08-46ce-a583-d71fb7a8825b}</Project >
40- <Private >True</Private >
41- <DoNotHarvest >True</DoNotHarvest >
42- <RefProjectOutputGroups >Binaries;Content;Satellites</RefProjectOutputGroups >
43- <RefTargetDir >INSTALLFOLDER</RefTargetDir >
44- </ProjectReference >
45- <ProjectReference Include =" ..\SqlWorkload\SqlWorkload.csproj" >
46- <Name >SqlWorkload</Name >
47- <Project >{fb46ad2c-df81-4d35-b419-d93e5ef9d98a}</Project >
48- <Private >True</Private >
49- <DoNotHarvest >
50- </DoNotHarvest >
51- <RefProjectOutputGroups >Binaries;Content;Satellites</RefProjectOutputGroups >
52- <RefTargetDir >INSTALLFOLDER</RefTargetDir >
53- </ProjectReference >
54- <ProjectReference Include =" ..\WorkloadViewer\WorkloadViewer.csproj" >
55- <Name >WorkloadViewer</Name >
56- <Project >{6e10e31f-d04d-4cb7-8bb9-71abd4b6b973}</Project >
57- <Private >True</Private >
58- <DoNotHarvest >True</DoNotHarvest >
59- <RefProjectOutputGroups >Binaries;Content;Satellites</RefProjectOutputGroups >
60- <RefTargetDir >INSTALLFOLDER</RefTargetDir >
61- </ProjectReference >
43+ <!--
44+ harvest.wxs, harvest2.wxs and harvest3.wxs are generated by heat.exe
45+ in buildmsi.ps1. Run buildmsi.ps1 before building from Visual Studio.
46+ -->
47+ <Compile Include =" harvest.wxs" Condition =" Exists('harvest.wxs')" />
48+ <Compile Include =" harvest2.wxs" Condition =" Exists('harvest2.wxs')" />
49+ <Compile Include =" harvest3.wxs" Condition =" Exists('harvest3.wxs')" />
6250 </ItemGroup >
6351 <ItemGroup >
6452 <Content Include =" postbuild.bat" />
6553 <Content Include =" SignMsi.ps1" />
6654 <Content Include =" transform.xsl" />
6755 <Content Include =" transform2.xsl" />
56+ <Content Include =" transform3.xsl" />
6857 </ItemGroup >
69- <Import Project =" $(WixTargetsPath)" Condition =" '$(WixTargetsPath)' != '' " />
70- <Import Project =" $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition =" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
71- <Target Name =" EnsureWixToolsetInstalled" Condition =" '$(WixTargetsImported)' != 'true' " >
72- <Error Text =" The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
73- </Target >
74- <!--
75- To modify your build process, add your task inside one of the targets below and uncomment it.
76- Other similar extension points exist, see Wix.targets.
77- <Target Name="BeforeBuild">
78- </Target>
79- <Target Name="AfterBuild">
80- </Target>
81- -->
82- <Target Name =" BeforeBuild" >
83- <GetAssemblyIdentity AssemblyFiles =" ..\SqlWorkload\bin\$(Platform)\$(Configuration)\SqlWorkload.exe" >
84- <Output TaskParameter =" Assemblies" ItemName =" AssemblyVersion" />
85- </GetAssemblyIdentity >
86- <PropertyGroup >
87- <DefineConstants >BuildVersion=%(AssemblyVersion.Version)</DefineConstants >
88- </PropertyGroup >
89- <HeatDirectory OutputFile =" $(ProjectDir)\harvest.wxs" Directory =" ..\SqlWorkload\bin\$(Platform)\$(Configuration)" ComponentGroupName =" ProductComponents" DirectoryRefId =" INSTALLFOLDER" AutogenerateGuids =" true" PreprocessorVariable =" var.SqlWorkload.TargetDir" SuppressRegistry =" true" SuppressRootDirectory =" true" ToolPath =" $(WixToolPath)" NoLogo =" true" Transforms =" transform.xsl" />
90- <HeatDirectory OutputFile =" $(ProjectDir)\harvest2.wxs" Directory =" ..\WorkloadViewer\bin\$(Platform)\$(Configuration)" ComponentGroupName =" WorkloadViewerComponents" DirectoryRefId =" INSTALLFOLDER" AutogenerateGuids =" true" PreprocessorVariable =" var.WorkloadViewer.TargetDir" SuppressRegistry =" true" SuppressRootDirectory =" true" ToolPath =" $(WixToolPath)" NoLogo =" true" Transforms =" transform.xsl;transform2.xsl" />
91- <HeatDirectory OutputFile =" $(ProjectDir)\harvest3.wxs" Directory =" ..\ConvertWorkload\bin\$(Configuration)" ComponentGroupName =" ConvertWorkloadComponents" DirectoryRefId =" INSTALLFOLDER" AutogenerateGuids =" true" PreprocessorVariable =" var.ConvertWorkload.TargetDir" SuppressRegistry =" true" SuppressRootDirectory =" true" ToolPath =" $(WixToolPath)" NoLogo =" true" Transforms =" transform.xsl;transform2.xsl" />
92- </Target >
9358 <PropertyGroup >
94- <PreBuildEvent />
95- </PropertyGroup >
96- <PropertyGroup >
97- <PostBuildEvent >call $(ProjectDir)postbuild.bat "!(TargetPath)" "$(TargetDir)$(SolutionName)_$(Platform)$(TargetExt)"</PostBuildEvent >
59+ <PostBuildEvent >call $(ProjectDir)postbuild.bat "$(TargetPath)" "$(TargetDir)WorkloadTools_$(Platform)$(TargetExt)"</PostBuildEvent >
9860 </PropertyGroup >
61+ <Import Project =" $(WixTargetsPath)" Condition =" Exists('$(WixTargetsPath)')" />
62+ <Target Name =" EnsureWixTargetsImported" BeforeTargets =" PrepareForBuild" Condition =" '$(WixTargetsImported)' == '' " >
63+ <Warning Text =" WiX Toolset v3 build targets were not found at '$(WixTargetsPath)'. Build skipped. Use buildmsi.ps1 to build the installer." />
64+ </Target >
65+ <Target Name =" Build" Condition =" '$(WixTargetsImported)' == '' " >
66+ <Message Text =" Setup project skipped: WiX Toolset v3 is not installed. Use buildmsi.ps1 to build the installer." Importance =" high" />
67+ </Target >
9968</Project >
0 commit comments