When side-by-side builds of Visual Studio are installed, build is picking the wrong one #1740

Open
opened 2026-01-30 22:35:13 +00:00 by claunia · 0 comments
Owner

Originally created by @davkean on GitHub (Jun 19, 2019).

Unsure if this a build.exe issue or a Razzle issue. Based on experiments, Razzle appears to be okay.

Environment

Visual Studio 16.2.0 Preview 4.0 [29018.107.d16.2stg] (installed to C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview)
Visual Studio 16.1 (installed to C:\Program Files (x86)\Microsoft Visual Studio\2019\RTM)

Steps to reproduce

  1. From a Developer Command Prompt For VS 2019 Preview, run:
> .\tools\razzle.cmd
> bcz

Expected behavior

Build to succeed.

Actual behavior

Build fails with:

Starting build...
MSBuild auto-detection: using msbuild version '16.200.19.31001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\16.2\MSBuild\Current\bin'.
All packages listed in packages.config are already installed.
Skipping building appx...
"C:\Program Files (x86)\Microsoft Visual Studio\2019\16.1\MSBuild\Current\Bin\MSBuild.exe" E:\terminal\OpenConsole.sln /t:Clean,Build /m /p:Configuration=Debug /p:Platform=x64 /p:AppxBundle=false
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 6/19/2019 10:58:30 AM.
     1>Project "E:\terminal\OpenConsole.sln" on node 1 (Clean;Build target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Debug|x64".
     1>Project "E:\terminal\OpenConsole.sln" (1) is building "E:\terminal\src\cascadia\TerminalApp\TerminalApp.vcxproj.
       metaproj" (2) on node 1 (Clean target(s)).
     2>Project "E:\terminal\src\cascadia\TerminalApp\TerminalApp.vcxproj.metaproj" (2) is building "E:\terminal\src\cas
       cadia\TerminalSettings\TerminalSettings.vcxproj" (6) on node 2 (Clean target(s)).
     6>E:\terminal\src\cppwinrt.build.pre.props(45,3): error MSB4019: The imported project "C:\Program Files (x86)\Micr
       osoft Visual Studio\2019\16.1\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that
       the path in the <Import> declaration is correct, and that the file exists on disk. [E:\terminal\src\cascadia\Ter
       minalSettings\TerminalSettings.vcxproj]

The build is failing because its using/looking in the wrong location for these targets files.

The first line says that its picked up the correct MSBuild ("16.2"):

MSBuild auto-detection: using msbuild version '16.200.19.31001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\16.2\MSBuild\Current\bin'.

But a few lines down, you can see that its picking up MSBuild from the 16.1 folder:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\16.1\MSBuild\Current\Bin\MSBuild.exe" E:\terminal\OpenConsole.sln /t:Clean,Build /m /p:Configuration=Debug /p:Platform=x64 /p:AppxBundle=false
Originally created by @davkean on GitHub (Jun 19, 2019). Unsure if this a build.exe issue or a Razzle issue. Based on experiments, Razzle appears to be okay. # Environment Visual Studio 16.2.0 Preview 4.0 [29018.107.d16.2stg] (installed to C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\) Visual Studio 16.1 (installed to C:\Program Files (x86)\Microsoft Visual Studio\2019\RTM\) # Steps to reproduce 1. From a _Developer Command Prompt For VS 2019 Preview_, run: ``` > .\tools\razzle.cmd > bcz ``` # Expected behavior Build to succeed. # Actual behavior Build fails with: ``` Starting build... MSBuild auto-detection: using msbuild version '16.200.19.31001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\16.2\MSBuild\Current\bin'. All packages listed in packages.config are already installed. Skipping building appx... "C:\Program Files (x86)\Microsoft Visual Studio\2019\16.1\MSBuild\Current\Bin\MSBuild.exe" E:\terminal\OpenConsole.sln /t:Clean,Build /m /p:Configuration=Debug /p:Platform=x64 /p:AppxBundle=false Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Build started 6/19/2019 10:58:30 AM. 1>Project "E:\terminal\OpenConsole.sln" on node 1 (Clean;Build target(s)). 1>ValidateSolutionConfiguration: Building solution configuration "Debug|x64". 1>Project "E:\terminal\OpenConsole.sln" (1) is building "E:\terminal\src\cascadia\TerminalApp\TerminalApp.vcxproj. metaproj" (2) on node 1 (Clean target(s)). 2>Project "E:\terminal\src\cascadia\TerminalApp\TerminalApp.vcxproj.metaproj" (2) is building "E:\terminal\src\cas cadia\TerminalSettings\TerminalSettings.vcxproj" (6) on node 2 (Clean target(s)). 6>E:\terminal\src\cppwinrt.build.pre.props(45,3): error MSB4019: The imported project "C:\Program Files (x86)\Micr osoft Visual Studio\2019\16.1\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [E:\terminal\src\cascadia\Ter minalSettings\TerminalSettings.vcxproj] ``` The build is failing because its using/looking in the wrong location for these targets files. The first line says that its picked up the correct MSBuild ("16.2"): ``` MSBuild auto-detection: using msbuild version '16.200.19.31001' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\16.2\MSBuild\Current\bin'. ``` But a few lines down, you can see that its picking up MSBuild from the 16.1 folder: ``` "C:\Program Files (x86)\Microsoft Visual Studio\2019\16.1\MSBuild\Current\Bin\MSBuild.exe" E:\terminal\OpenConsole.sln /t:Clean,Build /m /p:Configuration=Debug /p:Platform=x64 /p:AppxBundle=false ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1740