[wix-devs] Building Wix 4.0 commit f94e47a9e1b6d4366e5d2c8e850067204d0c5dc9 with VS 2019 present in addition to VS2022

Sean Hall r.sean.hall at gmail.com
Mon Feb 21 15:34:37 PST 2022


I hope that the tests aren't affected by the command prompt that you're
building from. They should be finding the correct MSBuild to run from the
vswhere.exe command ("vswhere -property installationpath") in
https://github.com/wixtoolset/wix4/blob/f94e47a9e1b6d4366e5d2c8e850067204d0c5dc9/src/internal/WixBuildTools.TestSupport/MsbuildRunner.cs
.

On Mon, Feb 21, 2022 at 5:19 PM Bob Arnson via wix-devs <
wix-devs at lists.wixtoolset.org> wrote:

> You have to run the build from a "Developer Command Prompt for VS 2022"
> shell. The MSBuild tests have some backward-compatibility features (that
> likely are no longer used) but the build doesn't.
>
> -----Original Message-----
> From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Ron
> Martin via wix-devs
> Sent: Monday, 21 February, 2022 18:02
> To: wix-devs <wix-devs at lists.wixtoolset.org>
> Cc: Ron Martin <cpuwzd at comcast.net>
> Subject: [wix-devs] Building Wix 4.0 commit
> f94e47a9e1b6d4366e5d2c8e850067204d0c5dc9 with VS 2019 present in addition
> to VS2022
>
> I've run into a problem when building commit
> f94e47a9e1b6d4366e5d2c8e850067204d0c5dc9 from the command line. Here is a
> summary of the output:
>
> [xUnit.net 00:00:09.04]
> WixE2E.WixE2EFixture.CanBuildPackageWithNativeWindowsApp [FAIL]
>     MSBuild failed unexpectedly. Output:
> Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
> -----------------------------------------------------------------------
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Current\Bin\amd64\MSBuild.exe
>  >>>-bl -Restore -v:m
> D:\AltRepos\AltWix\wix4\build\IntegrationWix\Debug\net472\TestData
>
>  >>>\WixprojPackageVcxprojWindowsApp\WixprojPackageVcxprojWindowsApp.wixproj
> -----------------------------------------------------------------------
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Microsoft\VC\v160
>
>  >>>\Microsoft.CppBuild.targets(439,5): error MSB8020: The build tools for
> v143 (Platform Toolset = 'v143')  >>>cannot be found.  To build using the
> v143 build tools, please install v143 build tools.
>  >>>Alternatively, you may upgrade to the current Visual Studio tools by
> selecting the Project menu  >>>or right-click the solution, and then
> selecting "Retarget solution".
>  >>>[D:\AltRepos\AltWix\wix4\build\IntegrationWix\Debug\net472\
>  >>>TestData\VcxprojWindowsApp\VcxprojWindowsApp.vcxproj]
>
> .....................................................................................
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Microsoft\VC\v160
>  >>>\Microsoft.CppBuild.targets(439,5): error MSB8020: The build tools for
> v143 (Platform Toolset = 'v143')  >>>cannot be found. To build using the
> v143 build tools, please install
> v143 build tools.
>  >>>Alternatively, you may upgrade to the current Visual Studio tools by
> selecting the Project menu  >>>or right-click the solution, and then
> selecting "Retarget solution".
>  >>>[D:\AltRepos\AltWix\wix4\build\IntegrationWix\Debug\net472\
>  >>>TestData\VcxprojStaticLib\VcxprojStaticLib.vcxproj]
> -----------------------------------------------------------------------
> [xUnit.net 00:00:24.35] WixE2E.WixE2EFixture.CanBuildWixlibWithNativeDll
> [FAIL]
>     MSBuild failed unexpectedly. Output:
> Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
> -----------------------------------------------------------------------
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Current\Bin\amd64\MSBuild.exe
>  >>>-bl -Restore -v:m
> D:\AltRepos\AltWix\wix4\build\IntegrationWix\Debug\net472\TestData
>  >>>\WixprojLibraryVcxprojDll\WixprojLibraryVcxprojDll.wixproj
> -----------------------------------------------------------------------
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Microsoft\VC\v160
>  >>>\Microsoft.CppBuild.targets(439,5): error MSB8020: The build tools for
> v143 (Platform Toolset = 'v143')  >>>cannot be found. To build using the
> v143 build tools, please install
> v143 build tools.
>  >>>Alternatively, you may upgrade to the current Visual Studio tools by
> selecting the Project menu  >>>or right-click the solution, and then
> selecting "Retarget solution".
>  >>>[D:\AltRepos\AltWix\wix4\build\IntegrationWix\Debug\net472\
>  >>>TestData\VcxprojStaticLib\VcxprojStaticLib.vcxproj]
>
> Because these messages indicated that VS 2019 was being used for these two
> builds, but VS 2019 was looking for the VS 2022 build tools, I decided to
> remove VS2019 from my system. I repeated the build and it was successful.
>
> I thought that perhaps there were vcxproj files calling for tools version
> 15.0, and that while searching for an appropriate match, VS2019 might be
> used, if present. In fact, there were
> 24 such vcxproj files. I updated all of them to use version 16.0, but with
> VS 2019 re-installed, the same failures again occurred.
>
> If you run the WixE2ETests from VS 2022, the failures also occur, but I
> haven't tried that with VS 2019 removed.
>
> I assume that I missed some parameter that needs to be changed to specify
> the version of VS to be used when building a vcxproj.
>
> Ron
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-devs mailing list