Skip to content

Error: .tools\msbuild\16.3.0-alpha\tools\MSBuild\Microsoft\VC\ was not found #24729

Description

@softworkz

Branch

Current release/3.1 branch

Describe the bug

Running the .\Restore.cmd command ends with an error about missing VC props and targets

To Reproduce

git clone https://github.com/dotnet/aspnetcore.git

cd aspnetcore

git checkout release/3.1

git submodule update --init --recursive

.\restore.cmd

Exceptions (if any)

F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(31,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(28,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(30,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(30,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(28,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(30,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(28,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.
F:\Projects\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(31,3): error MSB4019: The imported project "F:\Projects\aspnetcore\.tools\msbuild\16.3.0-alpha\tools\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.

Workaround

Can be fixed by copying over those files from a Visual Studio installation, e.g.:

xcopy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC" ".tools\msbuild\16.3.0-alpha\tools\MSBuild\Microsoft\VC\" /S

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions