I just updated my NuGet Package Manager on my corporate machine. Ever since the update, I am unable to add any package. I tried to install WebActivator for instance and got the following error:
PM> Install-Package WebActivator
Install-Package : The ServicePointManager does not support proxies with the https scheme.
At line:1 char:16
+ Install-Package <<<< WebActivator
+ CategoryInfo : NotSpecified: (:) [Install-Package], NotSupportedException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
How can I go about this?
The following work around helped me. Note that I am using Windows 7, Visual Studio 2010 Professional, IE 9 and am behind a corporate proxy. Your steps might vary depending on your environment:
Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Open the devenv.exe.config for editing.
In the System.Net node add the code given below.
Close Visual Studio and reopen it.
Check if the RSS feeds are displaying. If yes, everything else including Nuget should also work.
If RSS feeds section is prompting for password, then provide it and save it.
If things don't work still, run fiddler and go through steps 4 to 6 again. (Just running Fiddler in background also helps in some cases. See link below.)
Code to put in devenv.exe.config:
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy proxyaddress="http://ProxyServer:8080"/>
</defaultProxy>
This is really a hack based upon the following two discussions, but it works.
Cannot connect to any online resource
http://nuget.codeplex.com/discussions/242477
Hope this helps others who have similar issues. But I really wish there is a better way around. Hardcoding the proxy server and port doesn't seem to be a very maintainable solution. Also, there should be an alternative way of using NuGet packages like WebActivator and Nuget.MVC3.
As a backup if your proxy is HTTPS only, you can follow the package download instructions from:
Nuget packages without nuget package manager? and then the installation instructions from:
How to install a Nuget Package .nupkg file locally?.
I'm not behind a corporate proxy, so the error message made absolutely no sense to me. What helped, though, was to replace the default NuGet package source. I did this by:
Going into NuGet settings and adding a new package source pointing to http://nuget.org/api/v2/ (no s in the scheme)
Disabled the default source
Enabled my newly added source
Now, I don't get the error message anymore. Et voilĂ !
Related
Here's the solution layout:
FSharpNuGetTest (sln)
FirstService (F# 3.1 console project, .NET 4.5/4.5.2)
SecondService (F# 3.1 console project, .NET 4.5/4.5.2)
For the sake of an argument, let's say I want to install TopShelf from NuGet to both of those services. The error happens no matter the library, someone else had very similar issue not that long ago, but it seems I can actually reliably reproduce it.
NuGet Package Manager version: 2.8.60318.734
After opening NuGet package manager console in VS2013.4 Community Edition:
PM> Install-Package Topshelf -ProjectName FirstService
Installing 'Topshelf 3.1.4'.
(... snip - license stuff ...)
Successfully installed 'Topshelf 3.1.4'.
Adding 'Topshelf 3.1.4' to FirstService.
Successfully added 'Topshelf 3.1.4' to FirstService.
Perfect. Now let's try the same thing with the other service:
PM> Install-Package Topshelf -ProjectName SecondService
'Topshelf 3.1.4' already installed.
Adding 'Topshelf 3.1.4' to SecondService.
No exact match found for removing reference 'Topshelf'. Trying case-insensitive search...
Failed to find match for removing reference 'Topshelf'.
Install-Package : Failed to add reference to 'Topshelf'.
At line:1 char:16
+ Install-Package <<<< Topshelf
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Ooops...
I encountered it (again) when
Trying to install XUnit/NUnit to multiple F# test projects in a solution.
Most recently, when trying to install Akka.FSharp to multiple F# projects in a solution.
Any ideas how to fix it...?
It only happened to me with multiple F# projects - never had any issues with C# projects.
My bandaid solution is to copy & paste references from one .fsproj file to another. Update-Package even seems to be working after that operation.
That doesn't change the fact that it's a hack and not how solution management is supposed to work, especially when reinstall is needed - then you have to copy & paste all <Reference> elements from one .fsproj (the one that actually gets everything installed) to every other all over again, because NuGet package installation dies on subsequent projects...
Edit
It seems that brute force might work here - after c.a 4 tries, the package got installed to the second service application (?!).
That makes no sense...
I just hope I won't have to do that on CI server.
It's kind of a half-answer, but here it goes.
As I noted in the edit, brute-forcing seems to work. If it doesn't work the first time, just spamming Install-Package makes it work on the second (or third, or fourth...) try.
Weird...
I'm getting this error in Nuget Package Manager Console window, please see image attached. I think because of this I can not install an older version of package I need (Umbraco CMS) - during installation similar strange error arises with a bit different messages. I've checked this on different computer - without this error older package is being installed properly.
Tried re-installing Visual Studio 2 times - no effect. I could not achieved clean re-install, new VS instance inherits many plugins and features from previous instance.
Please somebody help me with this issue. Thanks in advance!
I am trying to add a reference to a project in Visual Studio 2012, by using 'Manage Nuget References'. The package is 'Wiki .NET Parser' (version 2.5.2.0).
When I try to add it, I get the below:
Successfully installed 'WikiNetParser 2.5.2.0'.
Successfully uninstalled 'WikiNetParser 2.5.2.0'.
Install failed. Rolling back...
Failed to add reference to 'WikiNetParser'. Please make sure that it is in the Global Assembly Cache.
I have also tried to create a clean, blank console project - But I still get the same problem. Any ideas?
A search on Google returned nothing specific to this component
The package appears to have a malformed manifest. I've reported this issue to the author of the package.
Specifically: The Manifest contains this node:
<frameworkAssemblies>
<frameworkAssembly assemblyName="WikiNetParser" targetFramework=".NETFramework4.0" />
</frameworkAssemblies>
Which tells NuGet to look for the "WikiNetParser" in the Core .Net 4.0 libraries, which of course does not exist. The node can simply be removed and the package should install successfully. If you want to try cracking the package open yourself, you can try using NuGet Package Explorer.
Can any one tell me why this type of error message is prompting when i am creating new project.
The error message is as below.
" Could not load file or assembly .
'Microsoft.VisualStudio.ManagedInterfaces, Version=8.0.0.0, Culture=neutral,PublicKey Token=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified."
What should I do to overcome this?
Maybe the "Repair" option on then VS2010 Setup will help. If not you might have to do a complete uninstall/reboot/install cycle.
A quick google search gave me something pointing at the VS SDK - maybe a reinstall of this might help too.
I had same issue after installation SP1. I tried re-install of SP1 with no success.
Get the Microsoft.VisualStudio.ManagedInterfaces.dll(if it is not present in your environment you can download it from here ) and install to global cache. Restart VS2010 and load you project again.
I have installed Nuget 1.2 yesterday, and today, while I was trying to install Entity Framework package, I have encountered the following problem in the Package Manager Console:
PM> install-package entityframework
Install-Package : The package source named 'NuGet official package source [https://go.microsoft.com/fwlink/?LinkID=206669]' is either
invalid or not available and thus is currently unreachable.
At line:1 char:16
+ install-package <<<< entityframework
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I can surft the internet and I don't think anything is preventing Visual Studio to access the internet.
Actually, there was something that was preventing Visual Studio from accessing the internet. Seems like VS had some problems with my proxy server.
So I used a solution that has been introduced in here and everything works fine now.
Same issue happened to my setup. However, i found that VS 2010 uses proxy settings from Internet Explorer. I have removed proxy settings from IE and it was successfully connecting.
To correct this problem permanently, a fix from Microsoft must be used
This is the name of the file KB2581019(VS10SP1-KB2581019-x86.exe)
While this link is active you can download path correction for it.
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=38654
It's solved!