From 5be795c6bcbc03bc37f7cf7c758298ccfaa884ca Mon Sep 17 00:00:00 2001
From: Sean Hall <r.sean.hall@gmail.com>
Date: Fri, 31 Dec 2021 16:20:11 -0600
Subject: Remove warnings and make sure more don't creep in.

Tests are not run inside of traversal projects so that skipped test warnings don't fail the build.
---
 src/api/api.cmd                                    |  4 ++-
 src/api/api_t.proj                                 |  8 ++---
 .../WixToolset.Mba.Core/WixToolset.Mba.Core.csproj |  2 ++
 src/api/burn/api_burn_t.proj                       | 36 ++++++++++++++++++++++
 src/api/burn/burn_t.proj                           | 34 --------------------
 .../WixToolsetTest.Mba.Core.csproj                 |  1 +
 src/api/wix/api_wix_t.proj                         | 12 ++++++++
 src/api/wix/wix_t.proj                             | 12 --------
 src/burn/burn.cmd                                  |  4 ++-
 src/burn/burn.sln                                  |  7 +++--
 src/burn/burn_t.proj                               |  8 ++---
 src/burn/engine/engine.vcxproj                     |  2 +-
 src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj    |  9 ------
 src/dtf/dtf.cmd                                    |  2 +-
 .../WixBuildTools.TestSupport.Native.nuspec        | 26 ----------------
 .../WixBuildTools.TestSupport.Native.vcxproj       |  8 +++++
 .../build/WixBuildTools.TestSupport.Native.targets |  6 ++--
 src/internal/internal.cmd                          |  5 +--
 src/libs/dutil/WixToolset.DUtil/dutil.vcxproj      |  1 -
 src/libs/dutil/dutil_t.proj                        |  4 +--
 .../dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj |  8 +++++
 src/libs/libs.cmd                                  |  4 ++-
 src/samples/samples.cmd                            |  2 +-
 .../WixToolset.Converters.Symbolizer.csproj        |  2 +-
 src/wix/WixToolset.Converters/WixConverter.cs      |  1 +
 src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs  |  1 +
 src/wix/wix.cmd                                    | 14 ++++-----
 src/wix/wixnative/wixnative_t.proj                 |  7 +++++
 28 files changed, 114 insertions(+), 116 deletions(-)
 create mode 100644 src/api/burn/api_burn_t.proj
 delete mode 100644 src/api/burn/burn_t.proj
 create mode 100644 src/api/wix/api_wix_t.proj
 delete mode 100644 src/api/wix/wix_t.proj
 delete mode 100644 src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.nuspec
 create mode 100644 src/wix/wixnative/wixnative_t.proj

diff --git a/src/api/api.cmd b/src/api/api.cmd
index 7a4bbb43..6a424c34 100644
--- a/src/api/api.cmd
+++ b/src/api/api.cmd
@@ -12,10 +12,12 @@
 :: build
 :: pack
 
-msbuild api_t.proj -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\api_build.binlog || exit /b
+msbuild api_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\api_build.binlog || exit /b
 
 :: test
 dotnet test burn\test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj -c %_C% --nologo --no-build || exit /b
+msbuild burn\test\BalUtilUnitTest -t:Test -p:Configuration=%_C% -nologo || exit /b
+msbuild burn\test\BextUtilUnitTest -t:Test -p:Configuration=%_C% -nologo || exit /b
 dotnet test wix\api_wix.sln -c %_C% --nologo --no-build || exit /b
 
 @popd
diff --git a/src/api/api_t.proj b/src/api/api_t.proj
index d89feccf..d2bb8af3 100644
--- a/src/api/api_t.proj
+++ b/src/api/api_t.proj
@@ -1,9 +1,9 @@
 <Project Sdk="Microsoft.Build.Traversal">
   <ItemGroup>
-    <ProjectReference Include="burn\burn_t.proj" Targets="Restore" BuildInParallel="false" />
-    <ProjectReference Include="wix\wix_t.proj" Targets="Restore" BuildInParallel="false" />
+    <ProjectReference Include="burn\api_burn_t.proj" Targets="Restore" BuildInParallel="false" />
+    <ProjectReference Include="wix\api_wix_t.proj" Targets="Restore" BuildInParallel="false" />
 
-    <ProjectReference Include="burn\burn_t.proj" />
-    <ProjectReference Include="wix\wix_t.proj" />
+    <ProjectReference Include="burn\api_burn_t.proj" />
+    <ProjectReference Include="wix\api_wix_t.proj" />
   </ItemGroup>
 </Project>
diff --git a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj b/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj
index 74cbe551..990d23ab 100644
--- a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj
+++ b/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj
@@ -11,6 +11,8 @@
     <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
     <IncludeSymbols>true</IncludeSymbols>
     <CreateDocumentationFile>true</CreateDocumentationFile>
+    <!-- https://github.com/NuGet/Home/issues/10665 -->
+    <NoWarn>NU5128</NoWarn>
   </PropertyGroup>
 
   <ItemGroup Condition=" '$(NCrunch)'=='' ">
diff --git a/src/api/burn/api_burn_t.proj b/src/api/burn/api_burn_t.proj
new file mode 100644
index 00000000..f6918682
--- /dev/null
+++ b/src/api/burn/api_burn_t.proj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+
+<Project Sdk="Microsoft.Build.Traversal">
+  <ItemGroup>
+    <!-- Restore: Explicitly restore the test projects, which need some hand-holding. -->
+    <ProjectReference Include="test\BalUtilUnitTest\BalUtilUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" />
+    <ProjectReference Include="test\BextUtilUnitTest\BextUtilUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" />
+
+    <!-- C++/CLI projects will try to build their dependent projects in parallel with others, so they must be built first. -->
+    <ProjectReference Include="test\BalUtilUnitTest\BalUtilUnitTest.vcxproj" Properties="Platform=x86" BuildInParallel="false" />
+    <ProjectReference Include="test\BextUtilUnitTest\BextUtilUnitTest.vcxproj" Properties="Platform=x86" BuildInParallel="false" />
+    
+    <!-- Make sure that if these rebuild balutil due to the inability for incremental build, then all shipped code uses the same binaries. -->
+    <ProjectReference Include="test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj" Properties="Platform=AnyCPU" BuildInParallel="false" />
+    <ProjectReference Include="WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" Properties="Platform=AnyCPU" BuildInParallel="false" />
+
+    <!-- Build -->
+
+    <!-- bextutil x86 is built by BextUtilUnitTest -->
+    <ProjectReference Include="bextutil\bextutil.vcxproj" Properties="Platform=x64" />
+    <ProjectReference Include="bextutil\bextutil.vcxproj" Properties="Platform=ARM64" />
+
+    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=x86" />
+    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=x64" />
+    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=ARM64" />
+
+    <!-- balutil is built by multiple projects above. -->
+
+    <!-- Pack -->
+    <ProjectReference Include="balutil\balutil.vcxproj" Targets="PackNative" />
+    <ProjectReference Include="bextutil\bextutil.vcxproj" Targets="PackNative" />
+    <ProjectReference Include="WixToolset.BootstrapperCore.Native\WixToolset.BootstrapperCore.Native.proj" Targets="Restore;PackNative" />
+    <ProjectReference Include="WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" Properties="NoBuild=true" Targets="Pack" />
+  </ItemGroup>
+</Project>
diff --git a/src/api/burn/burn_t.proj b/src/api/burn/burn_t.proj
deleted file mode 100644
index 46ccf8b2..00000000
--- a/src/api/burn/burn_t.proj
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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. -->
-
-<Project Sdk="Microsoft.Build.Traversal">
-  <ItemGroup>
-    <!-- Restore: Explicitly restore the test projects, which need some hand-holding. -->
-    <ProjectReference Include="test\BalUtilUnitTest\BalUtilUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" />
-    <ProjectReference Include="test\BextUtilUnitTest\BextUtilUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" />
-
-    <!-- Build -->
-
-    <ProjectReference Include="bextutil\bextutil.vcxproj" Properties="Platform=x86" />
-    <ProjectReference Include="bextutil\bextutil.vcxproj" Properties="Platform=x64" />
-    <ProjectReference Include="bextutil\bextutil.vcxproj" Properties="Platform=ARM64" />
-
-    <!-- Let mbanative build balutil for latest toolset. -->
-    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=x86" />
-    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=x64" />
-    <ProjectReference Include="mbanative\mbanative.vcxproj" Properties="Platform=ARM64" />
-
-    <ProjectReference Include="WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" Properties="Platform=AnyCPU" />
-    <ProjectReference Include="test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj" Properties="Platform=AnyCPU" />
-
-    <!-- Test -->
-    <ProjectReference Include="test\BalUtilUnitTest\BalUtilUnitTest.vcxproj" Targets="Test" />
-    <ProjectReference Include="test\BextUtilUnitTest\BextUtilUnitTest.vcxproj" Targets="Test" />
-
-    <!-- Pack -->
-    <ProjectReference Include="balutil\balutil.vcxproj" Targets="PackNative" />
-    <ProjectReference Include="bextutil\bextutil.vcxproj" Targets="PackNative" />
-    <ProjectReference Include="WixToolset.BootstrapperCore.Native\WixToolset.BootstrapperCore.Native.proj" Targets="Restore;PackNative" />
-    <ProjectReference Include="WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" Properties="NoBuild=true" Targets="Pack" />
-  </ItemGroup>
-</Project>
diff --git a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj b/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
index 8d68546f..af3a09b0 100644
--- a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
+++ b/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
@@ -7,6 +7,7 @@
     <IsPackable>false</IsPackable>
     <RuntimeIdentifier>win-x86</RuntimeIdentifier>
     <SignOutput>false</SignOutput>
+    <RollForward>Major</RollForward>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/src/api/wix/api_wix_t.proj b/src/api/wix/api_wix_t.proj
new file mode 100644
index 00000000..174b8b0e
--- /dev/null
+++ b/src/api/wix/api_wix_t.proj
@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.Build.Traversal">
+  <ItemGroup>
+    <!-- Build -->
+    <ProjectReference Include="WixToolset.Data\WixToolset.Data.csproj" />
+    <ProjectReference Include="WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
+    <ProjectReference Include="test\WixToolsetTest.Data\WixToolsetTest.Data.csproj" />
+
+    <!-- Pack -->
+    <ProjectReference Include="WixToolset.Data\WixToolset.Data.csproj" Targets="Pack" />
+    <ProjectReference Include="WixToolset.Extensibility\WixToolset.Extensibility.csproj" Targets="Pack" />
+  </ItemGroup>
+</Project>
diff --git a/src/api/wix/wix_t.proj b/src/api/wix/wix_t.proj
deleted file mode 100644
index 174b8b0e..00000000
--- a/src/api/wix/wix_t.proj
+++ /dev/null
@@ -1,12 +0,0 @@
-<Project Sdk="Microsoft.Build.Traversal">
-  <ItemGroup>
-    <!-- Build -->
-    <ProjectReference Include="WixToolset.Data\WixToolset.Data.csproj" />
-    <ProjectReference Include="WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
-    <ProjectReference Include="test\WixToolsetTest.Data\WixToolsetTest.Data.csproj" />
-
-    <!-- Pack -->
-    <ProjectReference Include="WixToolset.Data\WixToolset.Data.csproj" Targets="Pack" />
-    <ProjectReference Include="WixToolset.Extensibility\WixToolset.Extensibility.csproj" Targets="Pack" />
-  </ItemGroup>
-</Project>
diff --git a/src/burn/burn.cmd b/src/burn/burn.cmd
index 8c5010b5..b7c171c5 100644
--- a/src/burn/burn.cmd
+++ b/src/burn/burn.cmd
@@ -12,7 +12,9 @@
 
 nuget restore || exit /b
 
-msbuild burn_t.proj -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\burn_build.binlog || exit /b
+msbuild burn_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\burn_build.binlog || exit /b
+
+msbuild test\BurnUnitTest -t:Test -p:Configuration=%_C% -nologo || exit /b
 
 @popd
 @endlocal
diff --git a/src/burn/burn.sln b/src/burn/burn.sln
index 0a6227a5..c820a467 100644
--- a/src/burn/burn.sln
+++ b/src/burn/burn.sln
@@ -43,13 +43,14 @@ Global
 		{C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x64.Build.0 = Release|x64
 		{C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x86.ActiveCfg = Release|Win32
 		{C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x86.Build.0 = Release|Win32
-		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|ARM64.ActiveCfg = Debug|ARM64
+		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|ARM64.ActiveCfg = Debug|x64
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|x64.ActiveCfg = Debug|x64
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|x64.Build.0 = Debug|x64
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|x86.ActiveCfg = Debug|Win32
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Debug|x86.Build.0 = Debug|Win32
-		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|ARM64.ActiveCfg = Release|ARM64
-		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|x64.ActiveCfg = Release|Win32
+		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|ARM64.ActiveCfg = Release|x64
+		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|x64.ActiveCfg = Release|x64
+		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|x64.Build.0 = Release|x64
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|x86.ActiveCfg = Release|Win32
 		{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}.Release|x86.Build.0 = Release|Win32
 	EndGlobalSection
diff --git a/src/burn/burn_t.proj b/src/burn/burn_t.proj
index 0eed26ed..ffc0c780 100644
--- a/src/burn/burn_t.proj
+++ b/src/burn/burn_t.proj
@@ -1,10 +1,10 @@
 <Project Sdk="Microsoft.Build.Traversal">
   <ItemGroup>
-    <ProjectReference Include="test\BurnUnitTest\BurnUnitTest.vcxproj" Targets="Test" />
+    <ProjectReference Include="test\BurnUnitTest\BurnUnitTest.vcxproj" Properties="Platform=x86" BuildInParallel="false" />
 
-    <ProjectReference Include="burn.sln" Properties="Platform=x86" />
-    <ProjectReference Include="burn.sln" Properties="Platform=x64" />
-    <ProjectReference Include="burn.sln" Properties="Platform=ARM64" />
+    <ProjectReference Include="stub\stub.vcxproj" Properties="Platform=x86" />
+    <ProjectReference Include="stub\stub.vcxproj" Properties="Platform=x64" />
+    <ProjectReference Include="stub\stub.vcxproj" Properties="Platform=ARM64" />
 
     <ProjectReference Include="stub\stub.vcxproj" Targets="PackNative" />
   </ItemGroup>
diff --git a/src/burn/engine/engine.vcxproj b/src/burn/engine/engine.vcxproj
index ae28d728..3d6ed181 100644
--- a/src/burn/engine/engine.vcxproj
+++ b/src/burn/engine/engine.vcxproj
@@ -147,7 +147,7 @@
       <Message>Compiling message file...</Message>
       <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z engine.messages "$(InputDir)engine.mc"
 rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
-      <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc;$(OutDir)engine.res</Outputs>
+      <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc</Outputs>
     </CustomBuild>
   </ItemGroup>
 
diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj
index 714b6549..248d7bbb 100644
--- a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj
+++ b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj
@@ -13,10 +13,6 @@
       <Configuration>Debug</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|ARM64">
-      <Configuration>Debug</Configuration>
-      <Platform>ARM64</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
@@ -25,10 +21,6 @@
       <Configuration>Release</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|ARM64">
-      <Configuration>Release</Configuration>
-      <Platform>ARM64</Platform>
-    </ProjectConfiguration>
   </ItemGroup>
 
   <PropertyGroup Label="Globals">
@@ -78,7 +70,6 @@
   </ItemGroup>
 
   <ItemGroup>
-    <None Include="packages.config" />
     <ResourceCompile Include="BurnUnitTest.rc" />
   </ItemGroup>
 
diff --git a/src/dtf/dtf.cmd b/src/dtf/dtf.cmd
index 13f97ff0..dbc67c63 100644
--- a/src/dtf/dtf.cmd
+++ b/src/dtf/dtf.cmd
@@ -8,7 +8,7 @@
 
 @echo Building dtf %_C%
 
-msbuild -Restore -t:Pack dtf.sln -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\dtf_build.binlog|| exit /b
+msbuild -Restore -t:Pack dtf.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\dtf_build.binlog || exit /b
 
 @popd
 @endlocal
diff --git a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.nuspec b/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.nuspec
deleted file mode 100644
index 1dcdb78c..00000000
--- a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
-  <metadata minClientVersion="4.0">
-    <id>$id$</id>
-    <version>$version$</version>
-    <title>$title$</title>
-    <description>$description$</description>
-    <authors>$authors$</authors>
-    <license type="expression">MS-RL</license>
-    <requireLicenseAcceptance>false</requireLicenseAcceptance>
-    <copyright>$copyright$</copyright>
-    <projectUrl>$projectUrl$</projectUrl>
-    <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
-    <dependencies>
-      <group targetFramework=".NETFramework4.7.2" />
-    </dependencies>
-  </metadata>
-
-  <files>
-    <file src="$projectFolder$\build\$id$.props" target="build" />
-    <file src="$projectFolder$\build\$id$.targets" target="build" />
-
-    <file src="..\x86\$id$.dll" target="lib\net472" />
-    <file src="..\x86\$id$.pdb" target="lib\net472" />
-  </files>
-</package>
diff --git a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj b/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj
index 282aa306..a96f8d2f 100644
--- a/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj
+++ b/src/internal/WixBuildTools.TestSupport.Native/WixBuildTools.TestSupport.Native.vcxproj
@@ -9,10 +9,18 @@
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
 
   <PropertyGroup Label="Globals">
diff --git a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets b/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets
index 34ea148e..80b159ec 100644
--- a/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets
+++ b/src/internal/WixBuildTools.TestSupport.Native/build/WixBuildTools.TestSupport.Native.targets
@@ -10,10 +10,10 @@
   <!-- Include these references only when not referenced by the WixBuildTools.TestSupport.Native.vcxproj -->
   <ItemGroup Condition="'$(MSBuildProjectName)'!='$(MSBuildThisFileName)'">
     <Reference Include="WixBuildTools.TestSupport">
-      <HintPath>$(RootBuildFolder)internal\$(Configuration)\x86\WixBuildTools.TestSupport.dll</HintPath>
+      <HintPath>$(RootBuildFolder)internal\$(Configuration)\$(PlatformTarget)\WixBuildTools.TestSupport.dll</HintPath>
     </Reference>
     <Reference Include="WixBuildTools.TestSupport.Native">
-      <HintPath>$(RootBuildFolder)internal\$(Configuration)\x86\WixBuildTools.TestSupport.Native.dll</HintPath>
+      <HintPath>$(RootBuildFolder)internal\$(Configuration)\$(PlatformTarget)\WixBuildTools.TestSupport.Native.dll</HintPath>
     </Reference>
   </ItemGroup>
 
@@ -43,7 +43,7 @@
   </Target>
 
   <UsingTask AssemblyFile="$(RootPackagesFolder)xunit.runner.msbuild.2.4.1\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" Architecture="x86" />
-  <Target Name="Test" DependsOnTargets="Build">
+  <Target Name="Test">
     <xunit Assemblies="$(TargetPath)" />
   </Target>
 </Project>
diff --git a/src/internal/internal.cmd b/src/internal/internal.cmd
index ef465daa..8b46e77c 100644
--- a/src/internal/internal.cmd
+++ b/src/internal/internal.cmd
@@ -14,9 +14,10 @@ nuget restore || exit /b
 :: dotnet pack -c %_C% WixBuildTools.MsgGen\WixBuildTools.MsgGen.csproj || exit /b
 :: dotnet pack -c %_C% WixBuildTools.XsdGen\WixBuildTools.XsdGen.csproj || exit /b
 
-msbuild -t:Pack WixBuildTools.TestSupport\WixBuildTools.TestSupport.csproj -p:Configuration=%_C% -nologo || exit /b
+msbuild -t:Pack WixBuildTools.TestSupport\WixBuildTools.TestSupport.csproj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\internal_build.binlog || exit /b
 
-msbuild -t:Build WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj -p:Configuration=%_C% -nologo || exit /b
+msbuild -t:Build WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj -p:Configuration=%_C%;Platform=x86 -nologo || exit /b
+msbuild -t:Build WixBuildTools.TestSupport.Native\WixBuildTools.TestSupport.Native.vcxproj -p:Configuration=%_C%;Platform=x64 -nologo || exit /b
 
 @popd
 @endlocal
diff --git a/src/libs/dutil/WixToolset.DUtil/dutil.vcxproj b/src/libs/dutil/WixToolset.DUtil/dutil.vcxproj
index cf38e8ae..ba9e801e 100644
--- a/src/libs/dutil/WixToolset.DUtil/dutil.vcxproj
+++ b/src/libs/dutil/WixToolset.DUtil/dutil.vcxproj
@@ -33,7 +33,6 @@
     <ProjectGuid>{1244E671-F108-4334-BA52-8A7517F26ECD}</ProjectGuid>
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <TargetName>dutil</TargetName>
-    <MultiTargetLibrary>true</MultiTargetLibrary>
     <CharacterSet>MultiByte</CharacterSet>
     <Description>WiX Toolset native library foundation</Description>
     <PackageId>WixToolset.DUtil</PackageId>
diff --git a/src/libs/dutil/dutil_t.proj b/src/libs/dutil/dutil_t.proj
index 90d66440..ee33dae1 100644
--- a/src/libs/dutil/dutil_t.proj
+++ b/src/libs/dutil/dutil_t.proj
@@ -1,11 +1,9 @@
 <Project Sdk="Microsoft.Build.Traversal">
   <ItemGroup>
-    <ProjectReference Include="WixToolset.DUtil\dutil.vcxproj" Properties="Platform=x86" />
+    <ProjectReference Include="test\DUtilUnitTest\DUtilUnitTest.vcxproj" Properties="Platform=x86" />
     <ProjectReference Include="WixToolset.DUtil\dutil.vcxproj" Properties="Platform=x64" />
     <ProjectReference Include="WixToolset.DUtil\dutil.vcxproj" Properties="Platform=ARM64" />
 
-    <ProjectReference Include="test\DUtilUnitTest\DUtilUnitTest.vcxproj" Targets="Test" />
-
     <ProjectReference Include="WixToolset.DUtil\dutil.vcxproj" Targets="PackNative" />
   </ItemGroup>
 </Project>
diff --git a/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj b/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj
index cd8d16c4..9fca2608 100644
--- a/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj
+++ b/src/libs/dutil/test/DUtilUnitTest/DUtilUnitTest.vcxproj
@@ -9,10 +9,18 @@
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
 
   <PropertyGroup Label="Globals">
diff --git a/src/libs/libs.cmd b/src/libs/libs.cmd
index ddc2e1d6..2cc56239 100644
--- a/src/libs/libs.cmd
+++ b/src/libs/libs.cmd
@@ -8,7 +8,9 @@
 
 @echo Building libs %_C%
 
-msbuild -Restore libs_t.proj -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\libs_build.binlog || exit /b
+msbuild -Restore libs_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\libs_build.binlog || exit /b
+
+msbuild dutil\test\DutilUnitTest -t:Test -p:Configuration=%_C% -nologo || exit /b
 
 @popd
 @endlocal
diff --git a/src/samples/samples.cmd b/src/samples/samples.cmd
index 0321f75e..5d77270e 100644
--- a/src/samples/samples.cmd
+++ b/src/samples/samples.cmd
@@ -12,7 +12,7 @@
 
 nuget restore || exit /b
 
-msbuild -t:Build -p:Configuration=%_C% -bl:..\..\build\logs\samples_build.binlog || exit /b
+msbuild -t:Build -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\samples_build.binlog || exit /b
 
 @popd
 @endlocal
diff --git a/src/wix/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj b/src/wix/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj
index 0c3ba4f0..51463f2a 100644
--- a/src/wix/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj
+++ b/src/wix/WixToolset.Converters.Symbolizer/WixToolset.Converters.Symbolizer.csproj
@@ -15,7 +15,7 @@
 
   <ItemGroup>
     <Reference Include="wix" HintPath="..\deps\wix.dll" />
-    <None Include="..\deps\wix.dll" Pack="true" PackagePath="lib\net472" />
+    <None Condition=" '$(Configuration)'=='Release' " Include="..\deps\wix.dll" Pack="true" PackagePath="lib\net472" />
     <None Include="..\deps\wix.dll" Pack="true" PackagePath="lib\netstandard2.0" />
   </ItemGroup>
 
diff --git a/src/wix/WixToolset.Converters/WixConverter.cs b/src/wix/WixToolset.Converters/WixConverter.cs
index ea8e9b88..7bd2f81a 100644
--- a/src/wix/WixToolset.Converters/WixConverter.cs
+++ b/src/wix/WixToolset.Converters/WixConverter.cs
@@ -15,6 +15,7 @@ namespace WixToolset.Converters
     using WixToolset.Data.WindowsInstaller;
     using WixToolset.Extensibility.Services;
 
+#pragma warning disable 1591 // TODO: add documentation
     /// <summary>
     /// How to convert CustomTable elements.
     /// </summary>
diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
index 2c9b3252..696c73ee 100644
--- a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
+++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
@@ -44,6 +44,7 @@ namespace WixToolsetTest.Sdk
             }
         }
 
+        [Theory(Skip = "https://github.com/wixtoolset/issues/issues/6407")]
         [InlineData(BuildSystem.DotNetCoreSdk)]
         [InlineData(BuildSystem.MSBuild)]
         [InlineData(BuildSystem.MSBuild64)]
diff --git a/src/wix/wix.cmd b/src/wix/wix.cmd
index cd81dfce..7c4c1c18 100644
--- a/src/wix/wix.cmd
+++ b/src/wix/wix.cmd
@@ -13,15 +13,13 @@
 @echo Building wix %_C%
 
 :: Restore
-msbuild -t:Restore wix.sln -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\wix_restore.binlog || exit /b
+msbuild -t:Restore wix.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wix_restore.binlog || exit /b
 
 
 :: Build
-msbuild wixnative\wixnative.vcxproj -p:Configuration=%_C% -nologo -p:Platform=x86 || exit /b
-msbuild wixnative\wixnative.vcxproj -p:Configuration=%_C% -nologo -p:Platform=x64 || exit /b
-msbuild wixnative\wixnative.vcxproj -p:Configuration=%_C% -nologo -p:Platform=ARM64 || exit /b
+msbuild wixnative\wixnative_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wixnative_build.binlog || exit /b
 
-msbuild wix.sln -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\wix_build.binlog || exit /b
+msbuild wix.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wix_build.binlog || exit /b
 
 
 :: Pre-Publish Test
@@ -34,7 +32,7 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Heat || exit /b
 
 
 :: Publish
-msbuild publish_t.proj -p:Configuration=%_C% -nologo -bl:..\..\build\logs\wix_publish.binlog || exit /b
+msbuild publish_t.proj -p:Configuration=%_C% -nologo -warnaserror -bl:..\..\build\logs\wix_publish.binlog || exit /b
 
 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\buildtasks %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO% /XF Microsoft.Build.*.dll
 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\heat %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO%
@@ -48,7 +46,7 @@ robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks %_P%\WixTools
 robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\heat %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
 robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\wix %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
 
-msbuild -t:Publish -p:Configuration=%_C% -nologo -p:PublishDir=%_P%WixToolset.Sdk\ WixToolset.Sdk\WixToolset.Sdk.csproj || exit /b
+msbuild -t:Publish -p:Configuration=%_C% -nologo -warnaserror -p:PublishDir=%_P%WixToolset.Sdk\ WixToolset.Sdk\WixToolset.Sdk.csproj || exit /b
 
 :: TODO - used by MsbuildFixture.ReportsInnerExceptionForUnexpectedExceptions test
 :: msbuild -t:Publish -Restore -p:Configuration=%_C% -p:TargetFramework=net472 -p:RuntimeIdentifier=linux-x86 -p:PublishDir=%_P%WixToolset.Sdk\broken\net472\ wix\wix.csproj || exit /b
@@ -59,7 +57,7 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.BuildTasks || exit /
 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Sdk || exit /b
 
 :: Pack
-msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -bl:..\..\build\logs\wix_pack.binlog || exit /b
+msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wix_pack.binlog || exit /b
 
 @popd
 @endlocal
diff --git a/src/wix/wixnative/wixnative_t.proj b/src/wix/wixnative/wixnative_t.proj
new file mode 100644
index 00000000..db10d0ec
--- /dev/null
+++ b/src/wix/wixnative/wixnative_t.proj
@@ -0,0 +1,7 @@
+<Project Sdk="Microsoft.Build.Traversal">
+  <ItemGroup>
+    <ProjectReference Include="wixnative.vcxproj" Properties="Platform=x86" />
+    <ProjectReference Include="wixnative.vcxproj" Properties="Platform=x64" />
+    <ProjectReference Include="wixnative.vcxproj" Properties="Platform=ARM64" />
+  </ItemGroup>
+</Project>
-- 
cgit v1.2.3-55-g6feb