Thanks for checking out my question. I know it has been already asked in Stackoverflow but the answers could not solve my problem, so I have to flag here and wait for your help.
I am using Win10 sys. Visual Studio 2013. The trouble is, I could not install MySQL packet to my visual studio. According to some answers, I cleared the package cache, but still failed. The error msg is:
Please feel free to advice.
Right-click on your project in solution explorer and select "Manage NuGet Packages..".
1) Check which version of the Google.Protobuf package you have and remove it from your project.
2) Retry to install your MySql.Data package.
3) Then check if the version of Google.Protobuf installed with your MySql.Data is ok compared to the old one. If necessary, use the Package Manager to upgrade the Google.Protobuf package to the last recent version.
Related
So I am using Visual Studio 2022 on Windows 11. I am trying to install a nuget package.
I get the message The package at 'Path' failed to uninstall.
So I restart and guess what - it makes no difference. Its not a re-install so the package isnt already there. It does create the folder and contents in the packages folder. I have closed VS and manually deleted it. The same package works fine in another project!
Anybody any ideas how I move this forward?
Thanks in advance.
According to your description, you can try the following methods.
Go to Tools>Options>NuGet Package Manager>General and Clear All NuGet Cache(s).
Restore package.
Reinstall package.
Check your package.config file for package dependencies.
I've got a NuGet package installed, OpenCvSharp4.Windows, but for some reason when I try to use it in my code it is not recognized. I have other C# projects that have it installed the same way and it works fine.
Does anyone know why the package isn't being recognized?
delete obj and bin
rebuild
if problem remains, reinstall Opencvsharp4.Windows, and rebuild
When I tried to test/reproduce this issue on my side, I clicked to install OpenCvSharp4.Windows NuGet package. The installation was automatic and after the process finished installing, I saw that there are several other related NuGet packages installed as well, such as OpenCvSharp4, OpenCvSharp4.runtime.win and OpenCvSharp4.WpfExtensions. It seems OpenCvSharp4.Windows depends on these NuGet packages.
Checked the screenshot you shared, it seems only OpenCvSharp4.Windows NuGet package was installed. Could you please elaborate how you install this OpenCvSharp4.Windows NuGet package?
Suggestion
Please try to install other three NuGet packages which I mentioned above manually and reopen your project to see if it works this time.
I have Visual Studio 2019 Commmunity edition. Whenever I download any package from Nuget Package Manager -> Manage Nuget Packages for Solution, it throws an error
NuGet.Protocol.Plugins.PluginException: A plugin was not found at path
'C:\Users \ (Current Username)\ .nuget\plugins'
I can't download any packages even when I create new empty project.
I get the same error even when I use the
Install-Package
command. Please help
Answering my own question :
I realized that there is something called
NUGET_PLUGIN_PATHS
in environment variables. It was pointing to my 'C:\Users \ (Current Username)\ .nuget\plugins' directory . I deleted that environment variable and guess what ? It started downloading packages from nuget.org using Install-Package command. It took me 2 days to find this solution.
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'