No option for adding online packages in VS 2017 Community - visual-studio

I am trying to install a few online or external packages into my project using nuget in Visual Studio 2017. I tried the package console and it fails. The problem seems to be that the only package source I have available as an option is "Microsoft Visual Studio Offline". There is no "All" option in the package source drop down at the top of the package console, which I believe I need to see if I am trying to add online packages. I have searched all over the place for what might be a simple answer, but all answers seem to deal with other related matters and not specifically this one. Maybe I didn't type the correct phrase to yield results, but I tried and couldn't find them. What am I missing? A setting? Not the correct license? Thanks.
PM> install-package jquery
install-package : Unable to find package 'jquery'
At line:1 char:1
+ install-package jquery
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Go to manage NuGet package manager, click to setting gear button.
Then add new package source:
Name: nuget.org
URL: https://api.nuget.org/v3/index.json

Related

Update nuget package with option -IgnoreDependencies get error

I could not update the WindowsAzure.Storage NuGet Package with the option -IgnoreDependencies. When I update it with following command in the Package Manager Console, I always get the error:
update-package WindowsAzure.Storage -IgnoreDependencies
The error:
Update-Package : packages
At line:1 char:15
+ update-package <<<< WindowsAzure.Storage -IgnoreDependencies
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
Now my workaround is uninstall that package, then install it with the option -IgnoreDependencies. But I have a lot of projects and I need update it frequently. So I want to know the best way to resolve this issue.
Thanks in advance.
Update nuget package with option -IgnoreDependencies get error
I can reproduce this issue on one computer, but I can not reproduce it on another computer. I compared all the differences between them, the final finding is the NuGet Package Manager for Visual Studio version of the difference when you update the nuget package WindowsAzure.Storage with option -IgnoreDependencies.
The version of NuGet Package Manager for Visual Studio on the computer which have the issue is 3.4.4.1321, the version on another one is 3.5.0.1996. So to resolve this issue, please update the nuget package manager to the 3.5.0.1996:
Uninstall the 3.4.4 from Tools->Extensions and Updates->NuGet Package Manager for Visual Studio. Restart the Visual Studio. Then install the 3.5.0.1996 from nuget.org, restart the Visual Studio.
Note: This issue only occurred when you update the nuget package WindowsAzure.Storage from 4.3.0 with -IgnoreDependencies option.

Visual Studio 2017 Professional- Unable to find package at source

I was trying to add package through nuget package manager=> package manager console and from Manage Nuget packages from solution directly. I am trying to install Newtonsoft.Json from Package Manager Like this Install-Package Newtonsoft.Json but unable to find from the source i.e
Name: nuget.org
Source: https://api.nuget.org/v3/index.json
This gives me result like this:
PM> Install-Package Newtonsoft.Json
Install-Package : Unable to find package 'Newtonsoft.Json' at source ''.
At line:1 char:1
+ Install-Package Newtonsoft.Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:01:30.2571879
I think that the source here is blank. May be because of that it is unable to load packages. I have tried to manage the package manager setting but not been able to connect. My package manager setting is like this:
Despite of having good connection of internet I am not been able to install package. My questions are:
How should I install package?
What am I doing wrong to install package?
Assuming you are using Windows OS
Have you initialised vs 2017 after installation or Have you updated your vs 2017?
If not then please initialized it.
Restart your PC.
Open your project in vs 2017
Check your nuget package manager settings.
Name:nuget.org
Source:api.nuget.org/v3/index.json
Now, run nuget package manager from tools=>Nuget Package Manager=>Package Manager Console and write your install-package command or run Manage nuget package manager for solution from tools=>Nuget Package Manager=>
Hope,it helps you.
Your VS 2017 is probably using some kind of proxy setting which is preventing it from accessing the internet.
To check if VS can access internet try opening any web page from within VS Browser. If you cannot browse then my hunch is correct.
Solve the proxy issue and you should be fine.
Hope it helps.
I resolved this issue by adding nuget.org which was missing in my package source.
Go to Tools>Nuget package manager>Package Sources>
Click Plus sign >
Name: nuget.org
Source : https://api.nuget.org/v3/index.json
Now your Visual studio will be connected to Internet and package will be downloaded successfully.

Nuget Install A Package

I am trying to install "Microsoft.ProjectOxford.SpeechRecognition-x64" using Nuget on Visual studio. I got the following error. What does it mean? Thanks
PM> Install-Package Microsoft.ProjectOxford.SpeechRecognition-x64
Install-Package : Solution is not saved. Please save your solution before managing NuGet packages. At line:1 char:1
+ Install-Package Microsoft.ProjectOxford.SpeechRecognition-x64
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetUnsavedSolution,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
The NuGet team deprecated solution level packages in NuGet 3.0. So install the NuGet package to solution without any project is not supported. You need create a project, then add the package to the project.

C# - Xamarin : installing android.support.design package

i'm trying to install "Install-Package Xamarin.Android.Support.Design" into Xamarin Visual Studio 2015, but after it starts downloading, this error occurs
Install-Package : Unable to find package 'Xamarin.Android.Support.Design'
At line:1 char:1
+ Install-Package Xamarin.Android.Support.Design
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
i don't understand any of that, what is wrong?
Ensure that you have a proper NuGet source defined. You can go to Tools -> Options -> NuGet Package Manager -> Package Sources to make sure. i.e.: https://api.nuget.org/v3/index.json
Secondly you should double check that your NuGet version is the latest. Go to Tools -> Extensions and Updates and update if you aren't on the latest version.
Finally you could also try to manually download the package from https://www.nuget.org/packages/Xamarin.Android.Support.Design/ and setup a local NuGet repository to ensure that works. Chances are one of the first bullets should fix this.
Source: https://github.com/NuGet/Home/issues/842

Google calendar api download Nuget Error

Hi I'm trying to download the Google Calendar v3 API from nuget. When I type "Install-Package Google.Apis.Calendar.v3 -Pre" into the Package Manager console in Visual Studio 2010, I get this error:
PM> Install-Package Google.Apis.Calendar.v3 -Pre
Install-Package : A parameter cannot be found that matches parameter name 'Pre'.
At line:1 char:45
+ Install-Package Google.Apis.Calendar.v3 -Pre <<<<
+ CategoryInfo : InvalidArgument: (:) [Install-Package], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,NuGet.PowerShell.Commands.InstallPackageCommand
Not Sure where I went wrong. I'm pretty sure that is exactly what they tell you to do on NuGet's website. Any help would be appreciated.
Thanks.
could you please try with the latest NuGet from http://docs.nuget.org/docs/start-here/installing-nuget? it does not repro for me.
also, which project type are you trying to install the package to?

Resources