我在Jenkins下有3个项目:1个项目构建正常,2个项目遇到了Jenkins的MSBuild问题:恢复Nuget包总是失败。
我将Jenkins工作区中的2个项目的文件夹复制到C:\,然后打开VS社区2017并构建正常,但是VS社区2017的Jenkins工作区或Jenkins的MSBuild构建仍然失败。
我将Jenkins用户的权限更改为管理员,但同样的错误。
任何人都可以帮我解决这个问题吗?非常感谢。
詹金斯调用的msbuild日志:
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.Barcode\Delta.Barcode.csproj" (default target) (4:3) ->
(ReportAssetsLogMessages target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(327,5): error : Assets file 'C:\Delta-TRK\Delta.Barcode\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.Barcode\Delta.Barcode.csproj]
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.Barcode\Delta.Barcode.csproj" (default target) (4:3) ->
(RunResolvePackageDependencies target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Delta-TRK\Delta.Barcode\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.Barcode\Delta.Barcode.csproj]
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Core\Delta.CRM.Core.csproj" (default target) (5:13) ->
(ReportAssetsLogMessages target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(327,5): error : Assets file 'C:\Delta-TRK\Delta.CRM.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Core\Delta.CRM.Core.csproj]
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Core\Delta.CRM.Core.csproj" (default target) (5:13) ->
(RunResolvePackageDependencies target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Delta-TRK\Delta.CRM.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Core\Delta.CRM.Core.csproj]
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.ErrorCodes\Delta.ErrorCodes.csproj" (default target) (9:3) ->
(ReportAssetsLogMessages target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(327,5): error : Assets file 'C:\Delta-TRK\Delta.ErrorCodes\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.ErrorCodes\Delta.ErrorCodes.csproj]
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\CRMwebApp.sln" (Rebuild;Clean;Build target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta-TRK-web-application\CRMwebApp.csproj" (Rebuild target) (2) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.CRM.Services\Delta.CRM.Services.csproj" (default target) (3:3) ->
"C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.ErrorCodes\Delta.ErrorCodes.csproj" (default target) (9:3) ->
(RunResolvePackageDependencies target) ->
C:\Program Files\dotnet\sdk\2.1.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Delta-TRK\Delta.ErrorCodes\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Program Files (x86)\Jenkins\workspace\Delta-TRK\Delta.ErrorCodes\Delta.ErrorCodes.csproj]
0 Warning(s)
6 Error(s)