From 05ee2175b44c68816c24a33a16861a637fa15ad7 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 30 May 2020 18:55:57 +1000 Subject: Update MSBuild tests to use WixToolset.MSBuild.props to find wix.targets. --- src/ThmViewerPackage/ThmViewerPackage.wixproj | 4 ++-- src/Wix.Build.props | 2 ++ src/WixToolset.MSBuild/WixToolset.MSBuild.csproj | 1 + src/WixToolset.MSBuild/WixToolset.MSBuild.nuspec | 2 +- src/WixToolset.MSBuild/WixToolset.MSBuild.props | 8 -------- .../build/WixToolset.MSBuild.props | 8 ++++++++ src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | 20 ++++++++++---------- .../WixToolsetTest.MSBuild/MsbuildHeatFixture.cs | 6 +++--- .../HeatFileMultipleFilesSameFileName.wixproj | 7 ++----- .../TestData/HeatFilePackage/HeatFilePackage.wixproj | 7 ++----- .../MsiPackage/MsiPackage.wixproj | 11 ++--------- .../SimpleMsiPackage/MsiPackage/MsiPackage.wixproj | 7 ++----- .../SimpleBundle/SimpleBundle.wixproj | 7 ++----- 13 files changed, 37 insertions(+), 53 deletions(-) delete mode 100644 src/WixToolset.MSBuild/WixToolset.MSBuild.props create mode 100644 src/WixToolset.MSBuild/build/WixToolset.MSBuild.props (limited to 'src') diff --git a/src/ThmViewerPackage/ThmViewerPackage.wixproj b/src/ThmViewerPackage/ThmViewerPackage.wixproj index 212d1bae..9811782c 100644 --- a/src/ThmViewerPackage/ThmViewerPackage.wixproj +++ b/src/ThmViewerPackage/ThmViewerPackage.wixproj @@ -1,6 +1,6 @@ - + 59c4b122-5167-445b-8fc4-09dcd4eced89 @@ -23,7 +23,7 @@ - + diff --git a/src/Wix.Build.props b/src/Wix.Build.props index 936126e3..bf286bb4 100644 --- a/src/Wix.Build.props +++ b/src/Wix.Build.props @@ -9,4 +9,6 @@ + + diff --git a/src/WixToolset.MSBuild/WixToolset.MSBuild.csproj b/src/WixToolset.MSBuild/WixToolset.MSBuild.csproj index 2d5ea01b..ba67660c 100644 --- a/src/WixToolset.MSBuild/WixToolset.MSBuild.csproj +++ b/src/WixToolset.MSBuild/WixToolset.MSBuild.csproj @@ -12,6 +12,7 @@ + diff --git a/src/WixToolset.MSBuild/WixToolset.MSBuild.nuspec b/src/WixToolset.MSBuild/WixToolset.MSBuild.nuspec index ff0d74ee..be04d21b 100644 --- a/src/WixToolset.MSBuild/WixToolset.MSBuild.nuspec +++ b/src/WixToolset.MSBuild/WixToolset.MSBuild.nuspec @@ -11,7 +11,7 @@ - + diff --git a/src/WixToolset.MSBuild/WixToolset.MSBuild.props b/src/WixToolset.MSBuild/WixToolset.MSBuild.props deleted file mode 100644 index b453361b..00000000 --- a/src/WixToolset.MSBuild/WixToolset.MSBuild.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets')) - - diff --git a/src/WixToolset.MSBuild/build/WixToolset.MSBuild.props b/src/WixToolset.MSBuild/build/WixToolset.MSBuild.props new file mode 100644 index 00000000..b453361b --- /dev/null +++ b/src/WixToolset.MSBuild/build/WixToolset.MSBuild.props @@ -0,0 +1,8 @@ + + + + + + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets')) + + diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs index abb8673d..4a831061 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs @@ -11,7 +11,7 @@ namespace WixToolsetTest.MSBuild public class MsbuildFixture { - private static readonly string WixTargetsPath = Path.Combine(new Uri(typeof(MsbuildFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "tools", "wix.targets"); + private static readonly string WixPropsPath = Path.Combine(new Uri(typeof(MsbuildFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "build", "WixToolset.MSBuild.props"); [Fact] public void CanBuildSimpleBundle() @@ -27,7 +27,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", }); result.AssertSuccess(); @@ -63,7 +63,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", }); result.AssertSuccess(); @@ -124,7 +124,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}", - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", }); result.AssertSuccess(); @@ -150,7 +150,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", $"-p:InstallerPlatform=x64", }); result.AssertSuccess(); @@ -185,7 +185,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", "-p:SuppressIces=\"ICE45;ICE46\"" }); result.AssertSuccess(); @@ -206,7 +206,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", "-p:SuppressSpecificWarnings=\"1118;1102\"" }); result.AssertSuccess(); @@ -230,7 +230,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", "-p:OutputType=IntermediatePostLink" }); result.AssertSuccess(); @@ -256,7 +256,7 @@ namespace WixToolsetTest.MSBuild // Build var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", "-v:diag" }); result.AssertSuccess(); @@ -272,7 +272,7 @@ namespace WixToolsetTest.MSBuild // Clean result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", "-t:Clean", "-v:diag" }); diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs index b5331cbc..58a3d333 100644 --- a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs +++ b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs @@ -13,7 +13,7 @@ namespace WixToolsetTest.MSBuild public class MsbuildHeatFixture { - private static readonly string WixTargetsPath = Path.Combine(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "tools", "wix.targets"); + private static readonly string WixPropsPath = Path.Combine(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "build", "WixToolset.MSBuild.props"); [Fact] public void CanBuildHeatFilePackage() @@ -30,7 +30,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", }); result.AssertSuccess(); @@ -86,7 +86,7 @@ namespace WixToolsetTest.MSBuild var result = MsbuildRunner.Execute(projectPath, new[] { - $"-p:WixTargetsPath={WixTargetsPath}", + $"-p:WixMSBuildProps={WixPropsPath}", }); result.AssertSuccess(); diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj index 860fc2dd..7d751319 100644 --- a/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj @@ -1,5 +1,6 @@ + Debug x86 @@ -53,9 +54,5 @@ - - - - - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj index 87f4388a..3988acaf 100644 --- a/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj @@ -1,5 +1,6 @@ + Debug x86 @@ -48,9 +49,5 @@ - - - - - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj index e04ea43d..555addbe 100644 --- a/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj +++ b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj @@ -1,5 +1,6 @@  + Debug x86 @@ -12,10 +13,6 @@ en-US,en;de-DE - - ..\..\..\..\..\..\build\Release\publish\net461\wix.targets - - $(Platform) bin\$(Platform)\$(Configuration)\ @@ -49,9 +46,5 @@ - - - - - + diff --git a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj index d5cac8d8..18ae08b2 100644 --- a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj @@ -1,5 +1,6 @@ + Debug x86 @@ -41,9 +42,5 @@ - - - - - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj index 4c837936..199eb6d9 100644 --- a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj @@ -1,5 +1,6 @@ + Debug x86 @@ -37,9 +38,5 @@ - - - - - + \ No newline at end of file -- cgit v1.2.3-55-g6feb