diff options
12 files changed, 447 insertions, 0 deletions
diff --git a/src/WixToolset.BuildTasks/HeatProject.cs b/src/WixToolset.BuildTasks/HeatProject.cs index 71679dc4..3833a754 100644 --- a/src/WixToolset.BuildTasks/HeatProject.cs +++ b/src/WixToolset.BuildTasks/HeatProject.cs | |||
@@ -39,6 +39,8 @@ namespace WixToolset.BuildTasks | |||
39 | set { this.generateType = value; } | 39 | set { this.generateType = value; } |
40 | } | 40 | } |
41 | 41 | ||
42 | public string MsbuildBinPath { get; set; } | ||
43 | |||
42 | public string Platform | 44 | public string Platform |
43 | { | 45 | { |
44 | get { return this.platform; } | 46 | get { return this.platform; } |
@@ -77,6 +79,8 @@ namespace WixToolset.BuildTasks | |||
77 | } | 79 | } |
78 | } | 80 | } |
79 | 81 | ||
82 | public bool UseToolsVersion { get; set; } | ||
83 | |||
80 | protected override string OperationName | 84 | protected override string OperationName |
81 | { | 85 | { |
82 | get { return "project"; } | 86 | get { return "project"; } |
@@ -90,11 +94,16 @@ namespace WixToolset.BuildTasks | |||
90 | commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration); | 94 | commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration); |
91 | commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds); | 95 | commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds); |
92 | commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType); | 96 | commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType); |
97 | commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath); | ||
93 | commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform); | 98 | commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform); |
94 | commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups); | 99 | commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups); |
95 | commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName); | 100 | commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName); |
96 | commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables); | 101 | commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables); |
97 | 102 | ||
103 | #if !NETCOREAPP | ||
104 | commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion); | ||
105 | #endif | ||
106 | |||
98 | base.BuildCommandLine(commandLineBuilder); | 107 | base.BuildCommandLine(commandLineBuilder); |
99 | } | 108 | } |
100 | } | 109 | } |
diff --git a/src/WixToolset.Sdk/tools/wix.harvest.targets b/src/WixToolset.Sdk/tools/wix.harvest.targets index dea44469..f3ec760b 100644 --- a/src/WixToolset.Sdk/tools/wix.harvest.targets +++ b/src/WixToolset.Sdk/tools/wix.harvest.targets | |||
@@ -48,6 +48,7 @@ | |||
48 | <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms> | 48 | <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms> |
49 | <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile> | 49 | <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile> |
50 | <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile> | 50 | <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile> |
51 | <HarvestProjectsMsbuildBinPath Condition=" '$(HarvestProjectsMsbuildBinPath)' == '' ">$(MSBuildBinPath)</HarvestProjectsMsbuildBinPath> | ||
51 | </PropertyGroup> | 52 | </PropertyGroup> |
52 | 53 | ||
53 | <!-- Default HarvestDirectory properties --> | 54 | <!-- Default HarvestDirectory properties --> |
@@ -273,11 +274,13 @@ | |||
273 | Project="%(_AllHeatProjects.FullPath)" | 274 | Project="%(_AllHeatProjects.FullPath)" |
274 | ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)" | 275 | ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)" |
275 | GenerateType="%(_AllHeatProjects.GenerateType)" | 276 | GenerateType="%(_AllHeatProjects.GenerateType)" |
277 | MsbuildBinPath="$(HarvestProjectsMsbuildBinPath)" | ||
276 | DirectoryIds="%(_AllHeatProjects.DirectoryIds)" | 278 | DirectoryIds="%(_AllHeatProjects.DirectoryIds)" |
277 | ProjectName="%(_AllHeatProjects.ProjectName)" | 279 | ProjectName="%(_AllHeatProjects.ProjectName)" |
278 | Configuration="%(_AllHeatProjects.Configuration)" | 280 | Configuration="%(_AllHeatProjects.Configuration)" |
279 | Platform="%(_AllHeatProjects.Platform)" | 281 | Platform="%(_AllHeatProjects.Platform)" |
280 | GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)" | 282 | GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)" |
283 | UseToolsVersion="$(HarvestProjectsUseToolsVersion)" | ||
281 | AdditionalOptions="$(HarvestProjectsAdditionalOptions)" | 284 | AdditionalOptions="$(HarvestProjectsAdditionalOptions)" |
282 | RunAsSeparateProcess="$(RunWixToolsOutOfProc)" | 285 | RunAsSeparateProcess="$(RunWixToolsOutOfProc)" |
283 | ToolExe="$(HeatToolExe)" | 286 | ToolExe="$(HeatToolExe)" |
diff --git a/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs index 2f32a30f..10840c56 100644 --- a/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs +++ b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs | |||
@@ -146,5 +146,230 @@ namespace WixToolsetTest.Sdk | |||
146 | Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path); | 146 | Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path); |
147 | } | 147 | } |
148 | } | 148 | } |
149 | |||
150 | [Theory] | ||
151 | [InlineData(BuildSystem.DotNetCoreSdk, true)] | ||
152 | [InlineData(BuildSystem.DotNetCoreSdk, false)] | ||
153 | [InlineData(BuildSystem.MSBuild, true)] | ||
154 | [InlineData(BuildSystem.MSBuild, false)] | ||
155 | [InlineData(BuildSystem.MSBuild64, true)] | ||
156 | [InlineData(BuildSystem.MSBuild64, false)] | ||
157 | public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion) | ||
158 | { | ||
159 | var sourceFolder = TestData.Get(@"TestData\HeatProject"); | ||
160 | |||
161 | using (var fs = new TestDataFolderFileSystem()) | ||
162 | { | ||
163 | fs.Initialize(sourceFolder); | ||
164 | var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle"); | ||
165 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
166 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
167 | var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj"); | ||
168 | |||
169 | var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | ||
170 | { | ||
171 | useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, | ||
172 | }); | ||
173 | result.AssertSuccess(); | ||
174 | |||
175 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); | ||
176 | var heatCommandLine = Assert.Single(heatCommandLines); | ||
177 | |||
178 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) | ||
179 | { | ||
180 | Assert.Contains("-usetoolsversion", heatCommandLine); | ||
181 | } | ||
182 | else | ||
183 | { | ||
184 | Assert.DoesNotContain("-usetoolsversion", heatCommandLine); | ||
185 | } | ||
186 | |||
187 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
188 | Assert.Empty(warnings); | ||
189 | |||
190 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ToolsVersion4Cs.wxs"); | ||
191 | Assert.True(File.Exists(generatedFilePath)); | ||
192 | |||
193 | var generatedContents = File.ReadAllText(generatedFilePath); | ||
194 | var testXml = generatedContents.GetTestXml(); | ||
195 | Assert.Equal(@"<Wix>" + | ||
196 | "<Fragment>" + | ||
197 | "<DirectoryRef Id='ToolsVersion4Cs.Binaries'>" + | ||
198 | "<Component Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Guid='*'>" + | ||
199 | "<File Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.dll' />" + | ||
200 | "</Component>" + | ||
201 | "</DirectoryRef>" + | ||
202 | "</Fragment>" + | ||
203 | "<Fragment>" + | ||
204 | "<ComponentGroup Id='ToolsVersion4Cs.Binaries'>" + | ||
205 | "<ComponentRef Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' />" + | ||
206 | "</ComponentGroup>" + | ||
207 | "</Fragment>" + | ||
208 | "<Fragment>" + | ||
209 | "<DirectoryRef Id='ToolsVersion4Cs.Symbols'>" + | ||
210 | "<Component Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Guid='*'>" + | ||
211 | "<File Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.pdb' />" + | ||
212 | "</Component>" + | ||
213 | "</DirectoryRef>" + | ||
214 | "</Fragment>" + | ||
215 | "<Fragment>" + | ||
216 | "<ComponentGroup Id='ToolsVersion4Cs.Symbols'>" + | ||
217 | "<ComponentRef Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' />" + | ||
218 | "</ComponentGroup>" + | ||
219 | "</Fragment>" + | ||
220 | "<Fragment>" + | ||
221 | "<DirectoryRef Id='ToolsVersion4Cs.Sources'>" + | ||
222 | "<Component Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Guid='*'>" + | ||
223 | "<File Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Source='$(var.ToolsVersion4Cs.ProjectDir)\\ToolsVersion4Cs.csproj' />" + | ||
224 | "</Component>" + | ||
225 | "<Directory Id='ToolsVersion4Cs.Sources.Properties' Name='Properties'>" + | ||
226 | "<Component Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Guid='*'>" + | ||
227 | "<File Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Source='$(var.ToolsVersion4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" + | ||
228 | "</Component>" + | ||
229 | "</Directory>" + | ||
230 | "</DirectoryRef>" + | ||
231 | "</Fragment>" + | ||
232 | "<Fragment>" + | ||
233 | "<ComponentGroup Id='ToolsVersion4Cs.Sources'>" + | ||
234 | "<ComponentRef Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' />" + | ||
235 | "<ComponentRef Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' />" + | ||
236 | "</ComponentGroup>" + | ||
237 | "</Fragment>" + | ||
238 | "<Fragment>" + | ||
239 | "<ComponentGroup Id='ToolsVersion4Cs.Content' />" + | ||
240 | "</Fragment>" + | ||
241 | "<Fragment>" + | ||
242 | "<ComponentGroup Id='ToolsVersion4Cs.Satellites' />" + | ||
243 | "</Fragment>" + | ||
244 | "<Fragment>" + | ||
245 | "<ComponentGroup Id='ToolsVersion4Cs.Documents' />" + | ||
246 | "</Fragment>" + | ||
247 | "</Wix>", testXml); | ||
248 | |||
249 | var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectPreSdkStyle.wixpdb"); | ||
250 | Assert.True(File.Exists(pdbPath)); | ||
251 | |||
252 | var intermediate = Intermediate.Load(pdbPath); | ||
253 | var section = intermediate.Sections.Single(); | ||
254 | |||
255 | var fileSymbol = section.Symbols.OfType<FileSymbol>().Single(); | ||
256 | Assert.Equal(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); | ||
257 | } | ||
258 | } | ||
259 | |||
260 | [Theory] | ||
261 | [InlineData(BuildSystem.DotNetCoreSdk, true)] | ||
262 | [InlineData(BuildSystem.DotNetCoreSdk, false)] | ||
263 | [InlineData(BuildSystem.MSBuild, true)] | ||
264 | [InlineData(BuildSystem.MSBuild, false)] | ||
265 | [InlineData(BuildSystem.MSBuild64, true)] | ||
266 | [InlineData(BuildSystem.MSBuild64, false)] | ||
267 | public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion) | ||
268 | { | ||
269 | var sourceFolder = TestData.Get(@"TestData\HeatProject"); | ||
270 | |||
271 | using (var fs = new TestDataFolderFileSystem()) | ||
272 | { | ||
273 | fs.Initialize(sourceFolder); | ||
274 | var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle"); | ||
275 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
276 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
277 | var projectPath = Path.Combine(baseFolder, "HeatProjectSdkStyle.wixproj"); | ||
278 | var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj"); | ||
279 | |||
280 | var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[] | ||
281 | { | ||
282 | "-t:restore", | ||
283 | }); | ||
284 | result.AssertSuccess(); | ||
285 | |||
286 | result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] | ||
287 | { | ||
288 | useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, | ||
289 | }); | ||
290 | result.AssertSuccess(); | ||
291 | |||
292 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); | ||
293 | var heatCommandLine = Assert.Single(heatCommandLines); | ||
294 | |||
295 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) | ||
296 | { | ||
297 | Assert.Contains("-usetoolsversion", heatCommandLine); | ||
298 | } | ||
299 | else | ||
300 | { | ||
301 | Assert.DoesNotContain("-usetoolsversion", heatCommandLine); | ||
302 | } | ||
303 | |||
304 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
305 | Assert.Empty(warnings); | ||
306 | |||
307 | var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_SdkStyleCs.wxs"); | ||
308 | Assert.True(File.Exists(generatedFilePath)); | ||
309 | |||
310 | var generatedContents = File.ReadAllText(generatedFilePath); | ||
311 | var testXml = generatedContents.GetTestXml(); | ||
312 | Assert.Equal(@"<Wix>" + | ||
313 | "<Fragment>" + | ||
314 | "<DirectoryRef Id='SdkStyleCs.Binaries'>" + | ||
315 | "<Component Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Guid='*'>" + | ||
316 | "<File Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.dll' />" + | ||
317 | "</Component>" + | ||
318 | "</DirectoryRef>" + | ||
319 | "</Fragment>" + | ||
320 | "<Fragment>" + | ||
321 | "<ComponentGroup Id='SdkStyleCs.Binaries'>" + | ||
322 | "<ComponentRef Id='SdkStyleCs.Binaries.SdkStyleCs.dll' />" + | ||
323 | "</ComponentGroup>" + | ||
324 | "</Fragment>" + | ||
325 | "<Fragment>" + | ||
326 | "<DirectoryRef Id='SdkStyleCs.Symbols'>" + | ||
327 | "<Component Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Guid='*'>" + | ||
328 | "<File Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.pdb' />" + | ||
329 | "</Component>" + | ||
330 | "</DirectoryRef>" + | ||
331 | "</Fragment>" + | ||
332 | "<Fragment>" + | ||
333 | "<ComponentGroup Id='SdkStyleCs.Symbols'>" + | ||
334 | "<ComponentRef Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' />" + | ||
335 | "</ComponentGroup>" + | ||
336 | "</Fragment>" + | ||
337 | "<Fragment>" + | ||
338 | "<DirectoryRef Id='SdkStyleCs.Sources'>" + | ||
339 | "<Component Id='SdkStyleCs.Sources.SdkStyleCs.cs' Guid='*'>" + | ||
340 | "<File Id='SdkStyleCs.Sources.SdkStyleCs.cs' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.cs' />" + | ||
341 | "</Component>" + | ||
342 | "<Component Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Guid='*'>" + | ||
343 | "<File Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.csproj' />" + | ||
344 | "</Component>" + | ||
345 | "</DirectoryRef>" + | ||
346 | "</Fragment>" + | ||
347 | "<Fragment>" + | ||
348 | "<ComponentGroup Id='SdkStyleCs.Sources'>" + | ||
349 | "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.cs' />" + | ||
350 | "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.csproj' />" + | ||
351 | "</ComponentGroup>" + | ||
352 | "</Fragment>" + | ||
353 | "<Fragment>" + | ||
354 | "<ComponentGroup Id='SdkStyleCs.Content' />" + | ||
355 | "</Fragment>" + | ||
356 | "<Fragment>" + | ||
357 | "<ComponentGroup Id='SdkStyleCs.Satellites' />" + | ||
358 | "</Fragment>" + | ||
359 | "<Fragment>" + | ||
360 | "<ComponentGroup Id='SdkStyleCs.Documents' />" + | ||
361 | "</Fragment>" + | ||
362 | "</Wix>", testXml); | ||
363 | |||
364 | var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectSdkStyle.wixpdb"); | ||
365 | Assert.True(File.Exists(pdbPath)); | ||
366 | |||
367 | var intermediate = Intermediate.Load(pdbPath); | ||
368 | var section = intermediate.Sections.Single(); | ||
369 | |||
370 | var fileSymbol = section.Symbols.OfType<FileSymbol>().Single(); | ||
371 | Assert.Equal(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); | ||
372 | } | ||
373 | } | ||
149 | } | 374 | } |
150 | } | 375 | } |
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj new file mode 100644 index 00000000..c569e8ac --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj | |||
@@ -0,0 +1,50 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <Import Project="$(WixMSBuildProps)" /> | ||
4 | <PropertyGroup> | ||
5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
6 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
7 | </PropertyGroup> | ||
8 | |||
9 | <PropertyGroup> | ||
10 | <ProjectGuid>BB919765-DD69-41E7-91C5-415A69BE923E</ProjectGuid> | ||
11 | </PropertyGroup> | ||
12 | |||
13 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
14 | <PlatformName>$(Platform)</PlatformName> | ||
15 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
16 | <DefineConstants>Debug</DefineConstants> | ||
17 | </PropertyGroup> | ||
18 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
19 | <PlatformName>$(Platform)</PlatformName> | ||
20 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
21 | </PropertyGroup> | ||
22 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
23 | <PlatformName>$(Platform)</PlatformName> | ||
24 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
25 | <DefineConstants>Debug</DefineConstants> | ||
26 | </PropertyGroup> | ||
27 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
28 | <PlatformName>$(Platform)</PlatformName> | ||
29 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
30 | </PropertyGroup> | ||
31 | |||
32 | <ItemGroup> | ||
33 | <Compile Include="Package.wxs" /> | ||
34 | </ItemGroup> | ||
35 | |||
36 | <ItemGroup> | ||
37 | <BindInputPaths Include="." /> | ||
38 | </ItemGroup> | ||
39 | |||
40 | <PropertyGroup> | ||
41 | <EnableProjectHarvesting>true</EnableProjectHarvesting> | ||
42 | <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds> | ||
43 | </PropertyGroup> | ||
44 | |||
45 | <ItemGroup> | ||
46 | <ProjectReference Include="..\ToolsVersion4Cs\ToolsVersion4Cs.csproj" /> | ||
47 | </ItemGroup> | ||
48 | |||
49 | <Import Project="$(WixTargetsPath)" /> | ||
50 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs new file mode 100644 index 00000000..b2988760 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs | |||
@@ -0,0 +1,19 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="HeatProjectPreSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5622BB42-89F6-4810-A2A3-98AFF28282FE" Compressed="yes" InstallerVersion="200"> | ||
3 | |||
4 | |||
5 | <MediaTemplate /> | ||
6 | |||
7 | <Feature Id="ProductFeature" Title="HeatProjectFeature"> | ||
8 | <ComponentGroupRef Id="ToolsVersion4Cs.Binaries" /> | ||
9 | </Feature> | ||
10 | </Package> | ||
11 | |||
12 | <Fragment> | ||
13 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
14 | <Directory Id="ProgramFilesFolder"> | ||
15 | <Directory Id="ToolsVersion4Cs.Binaries" Name="MsiPackage" /> | ||
16 | </Directory> | ||
17 | </Directory> | ||
18 | </Fragment> | ||
19 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj new file mode 100644 index 00000000..907f0bb0 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj | |||
@@ -0,0 +1,50 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | <Import Project="$(WixMSBuildProps)" /> | ||
4 | <PropertyGroup> | ||
5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
6 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
7 | </PropertyGroup> | ||
8 | |||
9 | <PropertyGroup> | ||
10 | <ProjectGuid>CE998A54-9BEC-4268-BFA2-8E3DAE5831C8</ProjectGuid> | ||
11 | </PropertyGroup> | ||
12 | |||
13 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
14 | <PlatformName>$(Platform)</PlatformName> | ||
15 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
16 | <DefineConstants>Debug</DefineConstants> | ||
17 | </PropertyGroup> | ||
18 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
19 | <PlatformName>$(Platform)</PlatformName> | ||
20 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
21 | </PropertyGroup> | ||
22 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
23 | <PlatformName>$(Platform)</PlatformName> | ||
24 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
25 | <DefineConstants>Debug</DefineConstants> | ||
26 | </PropertyGroup> | ||
27 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
28 | <PlatformName>$(Platform)</PlatformName> | ||
29 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
30 | </PropertyGroup> | ||
31 | |||
32 | <ItemGroup> | ||
33 | <Compile Include="Package.wxs" /> | ||
34 | </ItemGroup> | ||
35 | |||
36 | <ItemGroup> | ||
37 | <BindInputPaths Include="." /> | ||
38 | </ItemGroup> | ||
39 | |||
40 | <PropertyGroup> | ||
41 | <EnableProjectHarvesting>true</EnableProjectHarvesting> | ||
42 | <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds> | ||
43 | </PropertyGroup> | ||
44 | |||
45 | <ItemGroup> | ||
46 | <ProjectReference Include="..\SdkStyleCs\SdkStyleCs.csproj" /> | ||
47 | </ItemGroup> | ||
48 | |||
49 | <Import Project="$(WixTargetsPath)" /> | ||
50 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs new file mode 100644 index 00000000..fc6e9d29 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs | |||
@@ -0,0 +1,19 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="HeatProjectSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="D2AF3276-A68E-40DE-85A1-4BCD5B35D432" Compressed="yes" InstallerVersion="200"> | ||
3 | |||
4 | |||
5 | <MediaTemplate /> | ||
6 | |||
7 | <Feature Id="ProductFeature" Title="HeatProjectFeature"> | ||
8 | <ComponentGroupRef Id="SdkStyleCs.Binaries" /> | ||
9 | </Feature> | ||
10 | </Package> | ||
11 | |||
12 | <Fragment> | ||
13 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
14 | <Directory Id="ProgramFilesFolder"> | ||
15 | <Directory Id="SdkStyleCs.Binaries" Name="MsiPackage" /> | ||
16 | </Directory> | ||
17 | </Directory> | ||
18 | </Fragment> | ||
19 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs new file mode 100644 index 00000000..2b2c5be2 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs | |||
@@ -0,0 +1,8 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace SdkStyleCs | ||
4 | { | ||
5 | public class SdkStyleCs | ||
6 | { | ||
7 | } | ||
8 | } | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj new file mode 100644 index 00000000..755976bc --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj | |||
@@ -0,0 +1,8 @@ | |||
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 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>netstandard2.0</TargetFramework> | ||
7 | </PropertyGroup> | ||
8 | </Project> | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..c29a2303 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs | |||
@@ -0,0 +1,11 @@ | |||
1 | // 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. | ||
2 | |||
3 | using System; | ||
4 | using System.Reflection; | ||
5 | using System.Runtime.InteropServices; | ||
6 | |||
7 | [assembly: AssemblyTitle("ToolsVersion4Cs")] | ||
8 | [assembly: AssemblyDescription("ToolsVersion4Cs")] | ||
9 | [assembly: AssemblyProduct("WiX Toolset")] | ||
10 | [assembly: AssemblyCompany("WiX Toolset Team")] | ||
11 | [assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")] | ||
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj new file mode 100644 index 00000000..9c55f7a5 --- /dev/null +++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj | |||
@@ -0,0 +1,36 @@ | |||
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 | |||
4 | |||
5 | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
6 | <PropertyGroup> | ||
7 | <ProjectGuid>{8B19578A-816A-48A1-A6C4-58067334EB79}</ProjectGuid> | ||
8 | <AssemblyName>ToolsVersion4Cs</AssemblyName> | ||
9 | <OutputType>Library</OutputType> | ||
10 | <RootNamespace>ToolsVersion4Cs</RootNamespace> | ||
11 | <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
12 | </PropertyGroup> | ||
13 | <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
14 | <DebugSymbols>true</DebugSymbols> | ||
15 | <Optimize>false</Optimize> | ||
16 | <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants> | ||
17 | <OutputPath>bin\Debug\</OutputPath> | ||
18 | </PropertyGroup> | ||
19 | <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
20 | <DebugSymbols>true</DebugSymbols> | ||
21 | <Optimize>true</Optimize> | ||
22 | <DefineConstants>$(DefineConstants);TRACE</DefineConstants> | ||
23 | <OutputPath>bin\Release\</OutputPath> | ||
24 | </PropertyGroup> | ||
25 | <ItemGroup> | ||
26 | <Compile Include="Properties\AssemblyInfo.cs" /> | ||
27 | </ItemGroup> | ||
28 | <ItemGroup> | ||
29 | <Reference Include="System" /> | ||
30 | <Reference Include="System.Configuration" /> | ||
31 | <Reference Include="System.Data" /> | ||
32 | <Reference Include="System.Xml" /> | ||
33 | </ItemGroup> | ||
34 | |||
35 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
36 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj index 916300af..45c38996 100644 --- a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj +++ b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj | |||
@@ -6,6 +6,7 @@ | |||
6 | <TargetFramework>net461</TargetFramework> | 6 | <TargetFramework>net461</TargetFramework> |
7 | <IsPackable>false</IsPackable> | 7 | <IsPackable>false</IsPackable> |
8 | <DebugType>embedded</DebugType> | 8 | <DebugType>embedded</DebugType> |
9 | <DefaultItemExcludes>TestData\**;$(DefaultItemExcludes)</DefaultItemExcludes> | ||
9 | </PropertyGroup> | 10 | </PropertyGroup> |
10 | 11 | ||
11 | <ItemGroup> | 12 | <ItemGroup> |
@@ -15,6 +16,14 @@ | |||
15 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 16 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
16 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.txt" CopyToOutputDirectory="PreserveNewest" /> | 17 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.txt" CopyToOutputDirectory="PreserveNewest" /> |
17 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.json" CopyToOutputDirectory="PreserveNewest" /> | 18 | <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.json" CopyToOutputDirectory="PreserveNewest" /> |
19 | <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\HeatProjectPreSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" /> | ||
20 | <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
21 | <Content Include="TestData\HeatProject\HeatProjectSdkStyle\HeatProjectSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" /> | ||
22 | <Content Include="TestData\HeatProject\HeatProjectSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
23 | <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.cs" CopyToOutputDirectory="PreserveNewest" /> | ||
24 | <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.csproj" CopyToOutputDirectory="PreserveNewest" /> | ||
25 | <Content Include="TestData\HeatProject\ToolsVersion4Cs\Properties\AssemblyInfo.cs" CopyToOutputDirectory="PreserveNewest" /> | ||
26 | <Content Include="TestData\HeatProject\ToolsVersion4Cs\ToolsVersion4Cs.csproj" CopyToOutputDirectory="PreserveNewest" /> | ||
18 | <Content Include="TestData\MergeModule\MergeMsiPackage\MergeMsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" /> | 27 | <Content Include="TestData\MergeModule\MergeMsiPackage\MergeMsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" /> |
19 | <Content Include="TestData\MergeModule\MergeMsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 28 | <Content Include="TestData\MergeModule\MergeMsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
20 | <Content Include="TestData\MergeModule\SimpleMergeModule\data\MergeModule.txt" CopyToOutputDirectory="PreserveNewest" /> | 29 | <Content Include="TestData\MergeModule\SimpleMergeModule\data\MergeModule.txt" CopyToOutputDirectory="PreserveNewest" /> |