0

Thanks for the method you provided. I need to join Open API now, I encountered this error, what is the reason? I have another project that has Swagger api on behalf of it. I now add it to the url according to the documentation, and an error is reported. Why is this?

Checking project for required NuGet packges...
Installing NuGet packages to project...
Installing package 'NSwag.ApiDescription.Client' with version '13.0.5'.
ErrorNuGet.Protocol.Core.Types.FatalProtocolException: The feed 'nuget.org [https://api.nuget.org/v3/index.json]' lists package 'NSwag.MSBuild.13.0.5' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again. ---> NuGet.Protocol.PackageNotFoundProtocolException: Unable to find package 'NSwag.MSBuild.13.0.5'.
   at NuGet.Protocol.FindPackagesByIdNupkgDownloader.<GetNuspecReaderFromNupkgAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.<GetDependencyInfoAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.SourceRepositoryDependencyProvider.<GetDependenciesCoreAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.SourceRepositoryDependencyProvider.<>c__DisplayClass21_0.<<GetDependenciesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Helen
  • 87,344
  • 17
  • 243
  • 314
Modi
  • 13
  • 2
  • 1
    The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again. ---> NuGet.Protocol.PackageNotFoundProtocolException: Unable to find package 'NSwag.MSBuild.13.0.5'. – BlackFox Jan 21 '22 at 00:23
  • https://github.com/Microsoft/azure-pipelines-tasks/issues/3762 – BlackFox Jan 21 '22 at 00:24
  • If you don't have VSTS, but just TFS then there is a recommended way to get NuGet 4.3.x https://blogs.msdn.microsoft.com/devops/2017/09/29/using-the-latest-nuget-in-your-build/ – BlackFox Jan 21 '22 at 00:24
  • "These days I don't do a restore at all for .Net core projects I just do a build or publish and that does the restore for you. There is a bit of a gotcha though ... if using cloud based build servers provided by Microsoft they change the versions of .Net Core often as a result of ongoing progress so if you don't keep up you start to find older projects break. The fix is simply to migrate your project to the latest .Net Core version." – BlackFox Jan 21 '22 at 00:25

0 Answers0