在Visual Studio中导入项目时出现错误MSB4019

时间:2018-10-17 17:32:15

标签: visual-studio

我正在尝试构建系统中已有的代码。在构建时出现以下错误。有人可以帮忙吗?

  

[错误] C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ 15.0 \ Bin \ Microsoft.CSharp.CurrentVersion.targets(321,5):错误MSB4019:导入找不到项目“ C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ 15.0 \ Bin \ Roslyn \ Microsoft.CSharp.Core.targets”。确认声明中的路径正确,并且文件在磁盘上。

2018-10-16T19:50:53.8048376Z Project "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (1) is building "C:\agent\_work\2\s\Hma.Portal.WinFormProject\Hma.Portal.WinFormProject.csproj" (3) on node 1 (default targets).
2018-10-16T19:50:53.8057282Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\agent\_work\2\s\Hma.Portal.WinFormProject\Hma.Portal.WinFormProject.csproj]
2018-10-16T19:50:53.8060584Z Done Building Project "C:\agent\_work\2\s\Hma.Portal.WinFormProject\Hma.Portal.WinFormProject.csproj" (default targets) -- FAILED.
2018-10-16T19:50:53.8120334Z ##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(321,5): Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
2018-10-16T19:50:53.8121658Z Project "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (1) is building "C:\agent\_work\2\s\Hma.EntityModels.MasterDatabase\Hma.EntityModels.MasterDatabase.csproj" (4) on node 1 (default targets).
2018-10-16T19:50:53.8122756Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\agent\_work\2\s\Hma.EntityModels.MasterDatabase\Hma.EntityModels.MasterDatabase.csproj]
2018-10-16T19:50:53.8124717Z Done Building Project "C:\agent\_work\2\s\Hma.EntityModels.MasterDatabase\Hma.EntityModels.MasterDatabase.csproj" (default targets) -- FAILED.
2018-10-16T19:50:53.8156228Z Done Building Project "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (default targets) -- FAILED.
2018-10-16T19:50:53.8194186Z 
2018-10-16T19:50:53.8194643Z Build FAILED.
2018-10-16T19:50:53.8284957Z 
2018-10-16T19:50:53.8301560Z "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (default target) (1) ->
2018-10-16T19:50:53.8302094Z "C:\agent\_work\2\s\Hma.Portal.WinFormProject.Setup\Hma.Portal.WinFormProject.Setup.vdproj.metaproj" (default target) (2) ->
2018-10-16T19:50:53.8302402Z (Build target) -> 
2018-10-16T19:50:53.8302821Z   C:\agent\_work\2\s\Hma.Portal.WinFormProject.Setup\Hma.Portal.WinFormProject.Setup.vdproj.metaproj : warning MSB4078: The project file "Hma.Portal.WinFormProject.Setup\Hma.Portal.WinFormProject.Setup.vdproj" is not supported by MSBuild and cannot be built.
2018-10-16T19:50:53.8303239Z 
2018-10-16T19:50:53.8311556Z 
2018-10-16T19:50:53.8312013Z "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (default target) (1) ->
2018-10-16T19:50:53.8312372Z "C:\agent\_work\2\s\Hma.Portal.WinFormProject\Hma.Portal.WinFormProject.csproj" (default target) (3) ->
2018-10-16T19:50:53.8314303Z   C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\agent\_work\2\s\Hma.Portal.WinFormProject\Hma.Portal.WinFormProject.csproj]
2018-10-16T19:50:53.8315306Z 
2018-10-16T19:50:53.8315460Z 
2018-10-16T19:50:53.8315785Z "C:\agent\_work\2\s\Hma.Portal.WinFormProject.sln" (default target) (1) ->
2018-10-16T19:50:53.8316173Z "C:\agent\_work\2\s\Hma.EntityModels.MasterDatabase\Hma.EntityModels.MasterDatabase.csproj" (default target) (4) ->
2018-10-16T19:50:53.8316836Z   C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(321,5): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\agent\_work\2\s\Hma.EntityModels.MasterDatabase\Hma.EntityModels.MasterDatabase.csproj]
2018-10-16T19:50:53.8317318Z 
2018-10-16T19:50:53.8318040Z     1 Warning(s)
2018-10-16T19:50:53.8318493Z     2 Error(s)
2018-10-16T19:50:53.8323589Z 

0 个答案:

没有答案