question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build from command line: restore.cmd/build.cmd fails

See original GitHub issue

Describe the bug

Unable to build from command line: restore.cmd/build.cmd fails.

(Running .\build.cmd /p:BuildNative=false also fails)

To Reproduce

Running restore.cmd fails on main ( which is currently at 0ecf4c1bd9526c36356a0f259d90aafdf0756fcd)

Exceptions (if any)

Build FAILED.

C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-
alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools
\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\to
ols\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild
\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetc
ore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\
msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\a
spnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.
tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\m
sbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5
.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\m
sbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5
.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\to
ols\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild
\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild
\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alp
ha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild
\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alp
ha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\a
spnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.
tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetc
ore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\
msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-
alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools
\MSBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tool
s\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\M
icrosoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-al
pha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\M
SBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-al
pha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\M
SBuild\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
C:\Users\shirh\source\repos\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tool
s\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "C:\Users\shirh\source\repos\aspnetcore\.tools\msbuild\16.5.0-alpha\tools\MSBuild\M
icrosoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
    0 Warning(s)
    16 Error(s)

Time Elapsed 00:00:15.57
Build failed with exit code 1. Check errors above.

Further technical details

.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.5.21264.3
 Commit:    94d9b1ee65

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.21390
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Users\shirh\source\repos\aspnetcore\.dotnet\sdk\6.0.100-preview.5.21264.3\

Host (useful for support):
  Version: 6.0.0-preview.6.21308.1
  Commit:  d52f925042

.NET SDKs installed:
  6.0.100-preview.5.21264.3 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.14 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.5.21263.4 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.27 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.14 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.5.21263.1 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.6.21308.1 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.5.21262.4 [C:\Users\shirh\source\repos\aspnetcore\.dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
shirhatticommented, Jun 9, 2021

Turns out this was my mistake. Running ./eng/scripts/InstallVisualStudio.ps1 -Edition Enterprise -Channel Preview fixed it for me.

Leaving this issue open in case we want to add anything to the build scripts to make this easier to diagnose.

2reactions
BrennanConroycommented, Jan 20, 2022

A curated error message would be great instead of some random vcxproj error that no one understands. Like if there was a way for us to see what you have available on the machine and compare it to what is required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CDMBuild 3.0 installation on windows - Systems Engineering
Looks like a runtime warning/error. Anyone managed to have a successful install on Windows ? Although it says invalid config, unable to figure...
Read more >
Unable to install CMBuild for the first time
Hi, I tried to install CMDBuild (core 3.4) on a Linux Mint (Debian) computer. First I installed the Postgres (version 12.10), the Apache ......
Read more >
» Technical Manual
The application. CMDBuild is an open source web environment for the configuration of custom applications for the. Asset Management.
Read more >
CMDBuild Windows instalaltion issue - Configurations
Hello,. I'm trying to install CMDBuild 3.4 on a Windows 10 that is a remote machine but I'm getting error.
Read more >
I am getting an error when running `R CMD build` on a ` ...
I uploaded the newly created directory onto a server I have access to and executed the R CMD build BSgenome.Ppatens.v3.3/ command from there ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found