Kirsten
Kirsten

Reputation: 18066

install-package Microsoft.Owin.Host.SystemWeb fails

I am working through Pluralsight course on OAuth2 and have added a project to the solution.

I used a new Asp.Net 4.5.2 empty template which I have set SSL to true on. I set the framework back to 4.5 to be consistent with the other projects in the solution.

I run the following in the Package Manager Console:

PM> install-package Microsoft.Owin.Host.SystemWeb

The error is:

Install-Package : Unable to find package 'Microsoft.Owin.Host.SystemWeb'At line:1 char:1
+ install-package Microsoft.Owin.Host.SystemWeb
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

After studying this question I tried adding the version from the course. Here is the result:

PM> install-package Microsoft.Owin.Host.SystemWeb -Version 3.0.1
Attempting to gather dependencies information for package 'Microsoft.Owin.Host.SystemWeb.3.0.1' with respect to project 'TripCompany.IdentityServer', targeting '.NETFramework,Version=v4.5'
Install-Package : Package 'Microsoft.Owin.Host.SystemWeb' is not found in the following primary source(s): 'E:\EShared\NuGet'. Please verify all your online 
package sources are available.At line:1 char:1
+ install-package Microsoft.Owin.Host.SystemWeb -Version 3.0.1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId 

Upvotes: 3

Views: 5618

Answers (2)

reza.cse08
reza.cse08

Reputation: 6178

I face the this type of problem for adding new package for VS 2013 it solved by

  1. goto Tools->Nuget Package Manager -> Package Manager Settings
  2. selected Nuget Package Manager->

    • a. General -> clear Package Cache(button at right side).

    • b. Package Sources and checked nuget.org in the available package sources.

Upvotes: 3

Kirsten
Kirsten

Reputation: 18066

It turned out that I did not have my package source set to nuget.org

In VS2015 I used Tools->Nuget Package Manager -> Package Manager Settings then selected Nuget Package Manager -> Package Sources and checked nuget.org in the available package sources.

Upvotes: 9

Related Questions