首先,我是Nuget的新手。我正在尝试使用Jenkins中的MS Build 15.x构建我的.net核心项目。 我的构建失败了,我得到了以下详细信息。您能帮我解决我做错了什么吗?
有什么办法可以解决? 或者我怎么可以跳过任何particuler目标,使”不恢复和的NuGet会忽略它..期待您快速帮助
Started by user Sikandar Hayyat
Building in workspace C:\Program Files (x86)\Jenkins\workspace\test
[test] $ cmd /c call C:\WINDOWS\TEMP\jenkins3265288796536177035.bat
C:\Program Files (x86)\Jenkins\workspace\test>C:\existing-nuget\nuget.exe restore "E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln"
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin'.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.RA\obj\project.assets.json
Restore completed in 126.48 ms for E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.RA\WebRA.Modules.RA.csproj.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Configurations\obj\project.assets.json
Restore completed in 157.91 ms for E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Configurations\WebRA.Modules.Configurations.csproj.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Accounts\obj\project.assets.json
Restore completed in 158.4 ms for E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Accounts\WebRA.Modules.Accounts.csproj.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Certificate\obj\project.assets.json
Restore completed in 158.42 ms for E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Certificate\WebRA.Modules.Certificate.csproj.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\WebRA.Modules.Common\obj\project.assets.json
Restore completed in 36.83 ms for E:\WebRA-SoucreCode\Code\trunk\WebRA.Modules.Common\WebRA.Modules.Common.csproj.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\WebRA.Admin\obj\project.assets.json
Restore completed in 108.06 ms for E:\WebRA-SoucreCode\Code\trunk\WebRA.Admin\WebRA.Admin.csproj.
WARNING: NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
WARNING: NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: E:\WebRA-SoucreCode\Code\trunk\WebRa.Web\obj\project.assets.json
Restore completed in 82.26 ms for E:\WebRA-SoucreCode\Code\trunk\WebRa.Web\WebRa.Web.csproj.
NuGet Config files used:
C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Jenkins\workspace\test>exit 0
Path To MSBuild.exe: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
Executing the command cmd.exe /C " chcp 1252 & "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln " && exit %%ERRORLEVEL%% from C:\Program Files (x86)\Jenkins\workspace\test
[test] $ cmd.exe /C " chcp 1252 & "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln " && exit %%ERRORLEVEL%%
Active code page: 1252
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 2/1/2019 10:40:26 PM.
Project "E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln" (1) is building "E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Accounts\WebRA.Modules.Accounts.csproj" (2) on node 1 (default targets).
C:\Program Files\dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): error NETSDK1064: Package BouncyCastle, version 1.8.4 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Accounts\WebRA.Modules.Accounts.csproj]
Done Building Project "E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Accounts\WebRA.Modules.Accounts.csproj" (default targets) -- FAILED.
Project "E:\WebRA-SoucreCode\Code\trunk\WEBRA.sln" (1) is building "E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Configurations\WebRA.Modules.Configurations.csproj" (3) on node 1 (default targets).
C:\Program **Files\dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): error NETSDK1064: Package BouncyCastle, version 1.8.4 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.** [E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Configurations\WebRA.Modules.Configurations.csproj]
Done Building Project "E:\WebRA-SoucreCode\Code\trunk\Modules\WebRA.Modules.Configurations\WebRA.Modules.Configurations.csproj" (default targets) -- FAILED.