Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install-package Microsoft.Owin.Host.SystemWeb fails

Tags:

nuget

owin

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 
like image 887
Kirsten Avatar asked Dec 27 '25 16:12

Kirsten


2 Answers

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.

like image 99
Kirsten Avatar answered Dec 31 '25 18:12

Kirsten


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.

like image 44
reza.cse08 Avatar answered Dec 31 '25 18:12

reza.cse08



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!