首页 > 解决方案 > 构建 .NET Framework 4.7.2 项目时的 MSB4019 Microsoft.WebApplication.targets

问题描述

当我使用

dotnet build

使用 .NET Framework 4.7.2 项目构建解决方案,我收到以下错误

error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.101\
Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. 
Confirm that the expression in the Import declaration "C:\Program files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" 
is correct, and that the file exists on disk.

在 VS2019 中,项目构建正确。如何修复路径?

.NET Core 3.1 SDK 已安装,我也尝试安装 .NET Framework 4.7.2 SDK - 没有结果

标签: .netmsbuild

解决方案


推荐阅读