我们有一些ASP.NET Core和.NET Framework ASP.NET应用程序。我们使用msbuild
和dotnet
的混合方式来构建这些应用。
我试图全部使用dotnet
,但是构建总是会出现以下错误:
错误 MSB4019: 未找到导入的项目“C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets”。请确认声明中的路径是否正确,并且该文件在磁盘上存在。
目前,我只是尝试非常简单的命令dotnet msbuild foo.sln
,暂时没有使用任何标志或其他选项。
我已经尝试了多个ASP.NET(非Core)应用程序,它们都会产生相同的错误。
dotnet
is the .NET Core-specific tool, MSBuild is the overall build framework that can handle any type of project. Usemsbuild
in the command line instead to build both types of projects, iemsbuild foo.sln
- Panagiotis Kanavos