Linux: Невозможно найти папку резервного пакета 'C: \ Program Files \ dotnet \ sdk \ NuGetFallbackFolder' - PullRequest
1 голос
/ 25 февраля 2020

У меня есть пример службы шлюза Ocelot, созданный с использованием Do tnet Core Web API V3.1. Я собрал решение на Windows машине, используя команду "do tnet clean and do tnet build", которая прекрасно работает. Я пытаюсь сделать то же самое в машине Ubuntu 18.04 LTS через Jenkins, которая вызывает следующую проблему.

/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
     1>Done Building Project "/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj" (Clean target(s)) -- FAILED.

Build FAILED.

       "/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj" (Clean target) (1) ->
       (ResolvePackageAssets target) ->
         /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
       /usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]

Пожалуйста, дайте мне знать, что мне здесь не хватает?

Примечание. У меня есть еще один linux компьютер, на котором установлены те же настройки (, но Do tnet Core). V2.2 ), где я мог бы построить API через Jenkins.

PS: Ниже приведен контент из .csproj

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <RootNamespace>GatewaySample_SERVICE</RootNamespace>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
    <PackageReference Include="Ocelot" Version="14.0.11" />
  </ItemGroup>

</Project>
...