I am using visual studio 2022 IDE and Despite several attempts I was not able to install the package Microsoft.EntityFramworkCore.Sqlserver.here are my settingsPackage Sources
General
and here is the error message I get:
The feed 'Nuget [https://api.nuget.org/v3/index.json]' lists package 'Microsoft.Data.SqlClient.SNI.runtime.4.0.0' 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.
Unable to find package 'Microsoft.Data.SqlClient.SNI.runtime.4.0.0'.
The optionsBuilder.UseSqlServer() method does not work in my application because the mentioned package is not available
You can download the package from nuget.org and install it manually.
check out the link Link
Try to install an older version.
Try with 5.0.8
Related
I try to download web.codegeneration.design version 6.0.7 in visual studio 2022 but i had error
And that is the error message:
The feed 'nuget.org (https://api.nuget.org/v3/index.json) lists package 'Microsoft.VisualStudio.Web.CodeGeneration.6.0.7' 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.
Unable to find package 'Microsoft.VisualStudio.Web.CodeGeneration.6.0.7'.
How i can solve it ?!!
I think you have wrong package name, you are missing the "Design"-part:
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 6.0.7
See here:
https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design/#versions-body-tab
Today I want to install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package.
But it turns out I get bad request for
https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.razor.runtimecompilation/5.0.10/microsoft.aspnetcore.mvc.razor.runtimecompilation.5.0.10.nupkg
And it said
"The feed 'nuget.org [https://api.nuget.org/v3/index.json]' lists package 'Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.5.0.10' 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.
Unable to find package 'Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.5.0.10'."
I have checked that package source is from
https://api.nuget.org/v3/index.json
Does anyone know how to fix this problem?
You might want to look at the answer here.
Just like Leo Liu-MSFT said:
Clean the entire NuGet package cache by the command:
nuget locals all -clear
Close all Visual Studio instances, delete the nuget.config file in the location:
C:\Users\leoliu\AppData\Roaming\NuGet\NuGet.Config
and then reopen Visual Studio to restore NuGet packages.
Check if there is a firewall policy or other proxy settings that is blocking the NuGet installation package.
I have a large project that has about a dozen dependencies. I have tried to install them all but ran into an error from VS. I am using Visual Studio 2015
"An error occurred while trying to restore packages: Unable to find version '3.0.3.1' of package'Lucene.Net.Core'."
Now I have a solution which I can use that is by the same name as this package, but VS refuses to let me updates, remove, or change ANYTHING related to these packages and asks that I restore the packages. I am entirely lost here friends, what should I do?
P.S. the two sources I am using for my package sources are:
https://www.nuget.org/api/v2/
https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/
The same error occurs for Lucene.Net.Contrib, pstsdk.net, and various packages.
One thing to check for is if your project is built on a version of the NET framework that is less than or equal to the target framework the package has.
If your project is a NET 4.5 based project, but the nuget package has a NET 4.5.2... then the package manager will error out.
"An error occurred while trying to restore packages: Unable to find version '3.0.3.1' of package'Lucene.Net.Core'."
When I use the packages sources which you provided, I found that only two versions (4.8.0 & 4.9.0) of package"Lucene.Net.Core" not have the version '3.0.3.1'.
Pay Attention:
I noticed that the author of this package have updated this package at March 11, 2017(3/11/2017), and only release the version 4.8.0 & 4.9.0. So this must be the reason for NuGet restore failed.
Besides, you said:
I have a solution which I can use that is by the same name as this
package, but VS refuses to let me updates, remove, or change ANYTHING
related to these packages
If you want to remove those error packages, you can try to use below command to force uninstall those packages:
Uninstall-Package Lucene.Net.Core -Force
Or you can delete this package from the package folder and delete the package list from the package.config.
Then install the correct version of the packages.
Although I was not able to get any of the posted answers to work, I ended up removing the project entirely and reinstalling VS, my project, and its dependencies. This ended up working.
Another thing to check is that the package manager configuration settings in visual studio list the public nuget feed (and if the feed is enabled too).
I have been using xamarin studio, it works fine when I download a sample project from mvvmcross. It compiles and deploys the device perfectly.
But when I open the project in the visual studio, there are a lot of missing packages for some reasons. Is there a way of handling ? I am using Nuget 2.8 in Visual studio 2013
When I open Nuget as follows, there is a button to restore the missing packages. I clicked on it.
Then it is attempting to download the missing packages, and then it realizes there are dependencies as follows:
Then I am attempting to download the dependency manually as follows but it shows the packages has already downloaded but I am still seeing the missing packages in the solution, nothing is affected.
Therefore I am getting hundreds of errors as follows:
When I take a look at the property of missing packages, I see as follows
You should update your NuGet Package Manager extension in Visual Studio and then try restoring the packages again.
The restore error MvvmCross.Binding already has a dependency defined for MvvmCross.Core is caused by an old version of the NuGet package manager extension not recognising the newer target frameworks that the MvvmCross.Binding NuGet package is using in its group dependencies. This bug has been fixed in a newer version of the NuGet Package Manager.
If you search for the 'already has a dependency defined' error message you will find several cases of this, such as this StackOverflow question, for example:
Can not install NuGet package
Right click on the solution in solution explorer and choose 'restore nuget packages'
When I try and build my project in Teamcity (or in a clean repository on my machine), it fails with the error message
The schema version of 'Microsoft.Bcl' is incompatible with version 1.7.30402.9028 of NuGet. Please upgrade NuGet to the latest version from <nuget url>...
I've set my NuGet.Targets to restore packages, and not require user interactions to accept licenses. In addition both my local machine and the build server have the restore packages setting enabled (in the project/env variable as appropriate).
I'm aware of this issue http://blogs.msdn.com/b/dotnet/archive/2013/06/12/nuget-package-restore-issues.aspx. I've tried the second and third options suggested here, but without success.
Does anyone have any suggestions how to resolve this error?
Turns out the version of NuGet that is held in the .nuget folder of my solution was out of date. The version that Visual Studio uses had updated correctly, but the command line version didn't.
I followed the instructions described here Nuget versioning issue with package restore to resolve the problem.
In the solution directory run these commands:
cd .nuget
nuget.exe update -Self
Try updating the nuget that teamcity is using
If you are using version 8.x.x
Administration -> Nuget Settings -> Nuget Commandline -> (click fetch nuget) -> then choose the latest version and install it. Make sure "Set as Default" is checked.