Good Day eveyone. I'm currently installing Xamarin.Forms Nuget Package but I repeatedly get this error whenever I trying to to install it.
Failed to retrieve information from remote source 'http://nuget.syncfusion.com/xamarin/FindPackagesById()?id='Xamarin.Forms''
I was able to install other packages but not this one. How can I solve this? Here's my printscreen.
What version of nuget are you running. You may need to try updating NuGet.
If that does not work or it is already updated, try to install the NuGet package using the Visual Studio Package Manager Console instead: In Visual Studio -> View -> Other Windows -> Package Manager Console
Then type: Install-Package PACKAGENAME -ProjectName PROJECTNAME You may need to repeat that for each project you want to install the package into.
Related
I would like to install a package i downloaded called swatch.AutofacConfiguration.1.3.0.nupkg
I have it stored locally. I just dont know how to install it.
I have tried using commands like
nuget install
nuget add -Source some/directory my.nupkg
I would like to add it to my solution please
The first thing I would suggest is instead of using the PMC (Package Manager Console) in Visual Studio use the Nuget Package Manager (which you can find by typing into the search bar at the top of the IDE).
Since the file extension is nupkg you can most definitely find it on there and have visual studio handle the installation and referencing. I hope that helps.
I am struggling with a project I just created on Visual Studio 2019. It's a .net C# project.
When I launch the project I get this error :
"Unable to find package Swashbuckle.AspNetCore. No
packages exist with this id in source(s): Microsoft Visual Studio Offline
Packages"
I have tried to install the package but it doesn't work. And I have the package already installed as you can see here :
What do you think I should do ?
I had the same issue.
You need to change your package sources, as shown in the image.
=> Tools >> NuGet Package Manager >> package sources then click at "+" and add : name: nuget.org.
source: https://api.nuget.org/v3/index.json
My problem apparently was that I only had Offline Packages as a source, so I added nuget too and VS was able to get the package from it.
Nuget package
https://api.nuget.org/v3/index.json
It's true. Swashbuckle.AspNetCore does not exist in the Offline Packages
So search for a replaceable package that covers your needs or
you can change the Package source to e.g All or whatever source you prefer
UPDATE
adding the package to your Offline Packages will solve it also.
Download package Swashbuckle.AspNetCore
Update the Offline Packages
=> Tools >> NuGet Package Manager >> Package Manager Settings.
=> Packages Sources tap > select the Microsoft Visual Studio Offline Packages => set the path => add the downloaded package.
=> click update.
And you can check or update the Offline Packages path.
Windows
Go to
C:\Program Files (x86)\NuGet\Config
in the Microsoft.VisualStudio.Offline.config file
key `Microsoft Visual Studio Offline Packages'
I want to install "Microsoft.VisualStudio.Web.CodeGeneration.Design" Package to Create AreaMVC and make views but The VisualStudio has this error
enter image description here
Given the error Visual Studio gave you, it seems that you cannot connect to the nuget servers.
Do you have a proxy enabled, or a firewall that is blocked nuget?
Can you access nuget and download any other packages?
If so, can you access the url in the error in a regular browser?
Have you tried installing it through the Package Manager Console? (Using the command Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 3.1.3)
Installing any package fails with this error, updating packages also creates this error. Clearing the NuGet cache files causes this error to change to "access to the path mono.cecil.dll is denied" when trying to install "Xamarin.GooglePlayServices.Ads". Restarting visual studio causes the package restore error to come back.
Versions:
OS: win 10
Visual Studio Information:https://pastebin.com/vnuyZMWk
Xamarin.Forms Project:
Target framework: .NET 2.0
Xamarin.Android project:
Minimum Android Version: 5.0 (API Level 21)
Target Android Version: Use Compile Using SDK version (8.0)
Well after some trial and error I have the solution.
Visual Studio:
Update visual studio https://pastebin.com/GkEeRqg3
Updates Xamarin.Forms and NuGet
Repair visual studio from the "Visual Studio installer"
This Fixes the access denied to *.dll error
Xamarin.Android project:
Set Target Android Version: 8.1 API 27
This makes the packages the require monoandroid81 happy.
Cleaning house
Delete the folder C:\Users\<Your_Name>\AppData\Local\Xamarin`
Not sure if this was necessary but I am documenting anything I did so others can replicate the solution.
Fixing NuGet
Right-click <Project_name>.android --> Set as startup project.
Tools --> NuGet Package Manager --> Package Manager Console
In the console CLI run Update-Package -Reinstall
Why did this happen?
One way or another some of the NuGet packages used in Xamarin.Android used monoandroid81. Even though my solution was set to use 80 some NuGet packages installed were only compatible with 81. This was shown in the NuGet Console.
Package Xamarin.Android.Support.v7.MediaRouter 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.v7.MediaRouter 27.0.2 supports:
monoandroid81 (MonoAndroid,Version=v8.1)
I faced the same error when I was trying to update the libraries one by one. Then I tried selecting all required libraries and clicked the Update button bellow the search box and it works. I have to tell that these libraries had dependencies between each other.
Here's an example:
Please help me understand: I have a Visual Studio project. It has Nuget package manager enabled. I install several libraries. The library versions are shown in packages.config. Each library has a corresponding entry in References.
Now, say I want to change the library version from, say, 2.2.0 to 2.1.0. How I do this? At first I assumed you could just change the version number in packages.config. But when I do this, and get Nuget to download an earlier version of the library, the project references are not changed.
Do I have to manually remove each and every reference in the project to 2.2.0 and replace it with 2.1.0?
I get the feeling I'm "doing it wrong", but there doesn't seem to be any examples I can find of anyone doing it right.
Thanks for any help!
Using jQuery as an example:
If you want to rollback to a previous version you can run the Uninstall-Package jQuery and Install-Package jQuery -Version 2.1.0 commands from the package manager console.
Also, the package nuget page will have a list off all the versions available. EX: jQuery
All of this and more available in the nuget Docs
You can't simply change the version in the config file since your project still holds a reference to the binaries, so the binaries need to be replaced too.
Now, I'm not entirely sure if there is a "downgrade" Powershell command but you can certainly uninstall the specific package and then install a lower version. By using the Package Manager Console. So from within Visual Studio:
Go to the View menu -> Other Windows -> Package Manager Console
Select the Default Project from the dropdown list
Then run the following command to uninstall the package
The command to uninstall is...
Uninstall-Package YOUR_PACKAGE_NAME
To install a lower version, run this command...
Install-Package YOUR_PACKAGE_NAME -Version 1.0
These and other commands are very well documented in The Package Manager Console Powershell Reference
Uninstall-Package Command
Install-Package Command