我正在通过关于OAuth2的 Pluralsight课程,并为解决方案添加了一个项目.
我使用了一个新的Asp.Net 4.5.2空模板,我将SSL设置为true.我将框架设置回4.5以与解决方案中的其他项目保持一致.
我在Package Manager控制台中运行以下命令:
PM> install-package Microsoft.Owin.Host.SystemWeb
错误是:
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
在研究了这个问题后,我尝试从课程中添加该版本.结果如下:
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
Kirsten Gree.. 9
事实证明我没有将我的包源设置为nuget.org
在VS2015中,我使用了Tools-> Nuget Package Manager - > Package Manager Settings,然后在可用的包源中选择了Nuget Package Manager - > Package Sources并检查了nuget.org.
事实证明我没有将我的包源设置为nuget.org
在VS2015中,我使用了Tools-> Nuget Package Manager - > Package Manager Settings,然后在可用的包源中选择了Nuget Package Manager - > Package Sources并检查了nuget.org.