dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.36k stars 9.99k forks source link

Unable to restore aspnetcore from `restore.cmd` #32466

Closed conficient closed 3 years ago

conficient commented 3 years ago

Describe the bug

Unable to run the restore.cmd successfully due to missing msbuild folder/libraries

To Reproduce

Log errors:

dotnet-install: ASP.NET Core Runtime version 3.1.14 is already installed.
C:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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.

Build FAILED.

Checked the folder path: .tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\ exists but there is no VC folder in it, hence the error. Have deleted the local repo and re-cloned again with the same result.

Further technical details

.NET SDKs installed: 2.1.401 [C:\Program Files\dotnet\sdk] 2.2.402 [C:\Program Files\dotnet\sdk] 3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk] 3.1.100-preview1-014459 [C:\Program Files\dotnet\sdk] 3.1.201 [C:\Program Files\dotnet\sdk] 3.1.300-preview-015115 [C:\Program Files\dotnet\sdk] 3.1.300 [C:\Program Files\dotnet\sdk] 3.1.401 [C:\Program Files\dotnet\sdk] 3.1.408 [C:\Program Files\dotnet\sdk] 5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk] 5.0.101 [C:\Program Files\dotnet\sdk] 5.0.102 [C:\Program Files\dotnet\sdk] 5.0.104 [C:\Program Files\dotnet\sdk] 5.0.202 [C:\Program Files\dotnet\sdk] 5.0.300-preview.21180.15 [C:\Program Files\dotnet\sdk] 6.0.100-preview.3.21202.5 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0-preview7.19365.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0-preview9.19424.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.3.21201.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.3.21201.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0-preview.3.21201.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

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


### Full `restore.cmd` log below:

Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected in C:\Program Files. Detected JDK in C:\Program Files\Microsoft\jdk-11.0.10.9-hotspot\ (via JAVA_HOME)

Determining projects to restore... Tool 'dotnet-serve' (version '1.7.139') was restored. Available commands: dotnet-serve Tool 'playwright-sharp-tool' (version '0.170.2') was restored. Available commands: playwright-sharp

Restore was successful. Restored C:\Users\Howard.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21230.2\tools\Tools.proj (in 129 ms). Determining projects to restore... All projects are up-to-date for restore. GenerateFiles -> C:\Github\aspnetcore\artifacts\bin\GenerateFiles\Directory.Build.props GenerateFiles -> C:\Github\aspnetcore\artifacts\bin\GenerateFiles\Directory.Build.targets dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 2.1.27 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 6.0.0-preview.5.21254.12 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 6.0.0-preview.5.21254.12 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: ASP.NET Core Runtime version 3.1.14 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. Determining projects to restore... All projects are up-to-date for restore. RepoTasks -> C:\Github\aspnetcore\artifacts\bin\RepoTasks\Release\net472\RepoTasks.dll RepoTasks -> C:\Github\aspnetcore\artifacts\bin\RepoTasks\Release\net6.0\RepoTasks.dll

Tool 'dotnet-serve' (version '1.7.139') was restored. Available commands: dotnet-serve Tool 'playwright-sharp-tool' (version '0.170.2') was restored. Available commands: playwright-sharp

Restore was successful. Restore completed in 459.27 ms for C:\Users\Howard.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21230.2\tools\Tools.proj. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 2.1.27 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 6.0.0-preview.5.21254.12 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime version 6.0.0-preview.5.21254.12 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights. dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs. dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: ASP.NET Core Runtime version 3.1.14 is already installed. dotnet-install: Adding to current process PATH: "C:\Github\aspnetcore.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. C:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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.

Build FAILED.

C:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\IISLib\IISLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\CommonLibTests\CommonLibTests.vcxproj(41,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\gtest\gtest.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj(39,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj(38,3): error MSB4019: The imported project "C:\Github\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:\Github\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:\Github\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\RequestHandlerLib\RequestHandlerLib.vcxproj(36,3): error MSB4019: The imported project "C:\Github\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:\Github\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. 0 Warning(s) 16 Error(s)

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

conficient commented 3 years ago

The related issue #22951 is the solution - the build instructions won't work if the Windows10SDK is not installed in Visual Studio 2019.

I ran ./eng/scripts/InstallVisualStudio.ps1 in PowerShell which installed the missing SDK. After this the restore worked.

Either the dependencies need to be fixed or the restore process amended! I will leave that to 22951 and close this issue as it's a duplicate.