question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not install package because of Nuget V2 deprecation

See original GitHub issue

Description

I got api deprecation error while installing a package

  • NuGet Package: System.Buffers [4.4.0, ) or greater
  • NuGetForUnity Version: 3.0.1
  • Unity Version: 2020.1.3f1
  • Operating System: macOS 11.2
System.Net.WebException: The remote server returned an error: (400) Bad Request.
  at System.Net.HttpWebRequest+<GetResponseFromData>d__240.MoveNext () [0x00152] in <525dc68fbe6640f483d9939a51075a29>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Net.HttpWebRequest.GetResponse () [0x00013] in <525dc68fbe6640f483d9939a51075a29>:0 
  at NugetForUnity.NugetHelper.RequestUrl (System.String url, System.String userName, System.String password, System.Nullable 1[T] timeOut) [0x000b9] in <ebb7710be32040ba9a0cb144ce2a8967>:0 
  at NugetForUnity.NugetPackageSource.GetPackagesFromUrl (System.String url, System.String username, System.String password) [0x0006c] in <ebb7710be32040ba9a0cb144ce2a8967>:0 
  at NugetForUnity.NugetPackageSource.FindPackagesById (NugetForUnity.NugetPackageIdentifier package) [0x000ee] in <ebb7710be32040ba9a0cb144ce2a8967>:0 
UnityEngine.Debug:LogErrorFormat(String, Object[])
NugetForUnity.NugetPackageSource:FindPackagesById(NugetPackageIdentifier)
NugetForUnity.NugetPackageSource:GetSpecificPackage(NugetPackageIdentifier)
NugetForUnity.NugetHelper:GetOnlinePackage(NugetPackageIdentifier)
NugetForUnity.NugetHelper:GetSpecificPackage(NugetPackageIdentifier)
NugetForUnity.NugetHelper:InstallIdentifier(NugetPackageIdentifier, Boolean)
NugetForUnity.NugetHelper:Install(NugetPackage, Boolean)
NugetForUnity.NugetHelper:InstallIdentifier(NugetPackageIdentifier, Boolean)
NugetForUnity.NugetHelper:Install(NugetPackage, Boolean)
NugetForUnity.Nuge```

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
DWishRcommented, Apr 15, 2021

Installing from source is easy, just drop this folder (and contents) into the Assets folder of your project. If you want #385 and #389 then use this folder.

I want ahead and posted a Unity Package at this comment.

2reactions
opexsdccommented, Mar 26, 2021

Please see the related PR.

If you want to apply the fix and use this in Unity now, clone the repo, modify the request in Assets/NuGet/Editor/NugetPackageSource.cs to drop &$orderby=Version asc. Rebuild using the repo build.ps1 script to generate a new DLL and swap that in to your Unity project.

(You may need to modify: Packager/ProjectSettings/ProjectVersion.txt to match whatever Unity version you have installed)

See: https://devblogs.microsoft.com/nuget/custom-v2-odata-queries-will-be-deprecated-march-9-2021/


There is probably some more sensible changes to be done to update to some newer version of OData - I’ll leave that to wiser heads! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

nuget - Could not install package '--'. You are trying to ...
In my case, I was trying to insert a package of our own making that we put into our own Nuget feed, so...
Read more >
Deprecating packages on nuget.org
Visual Studio warns about a deprecated package's usage on the Installed tab. It will show a warning for the package and its deprecation...
Read more >
Unable to resolve dependencies of NuGet packages
When you upgrade the site by installing Telerik.Sitefinity.All NuGet package, Visual Studio throws the following error: Unable to resolve dependencies.
Read more >
All packages are up-to-date but Visual Studio still reports a ...
Visual Studio permanently shows in the NuGet visualization that a package would ism deprecated - but all packages are up-to-date. If the error...
Read more >
Problems With My NuGet.org Connectors
NuGet.org has deprecated its previous queries to check the status and count of NuGet packages because they are very taxing on the NuGet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found