我正在尝试使用以下方法安装SignalR:
Install-Package Microsoft.AspNet.SignalR -pre
我收到一条错误消息,指出Nuget无法添加Microsfot.Web.Infrastructure
引用。任何人都知道为什么会这样?以下是完整输出:
PM> Install-Package Microsoft.AspNet.SignalR -pre
Attempting to resolve dependency 'Microsoft.AspNet.SignalR.JS (≥ 1.0.0-rc1)'.
Attempting to resolve dependency 'jQuery (≥ 1.6.4)'.
Attempting to resolve dependency 'Microsoft.AspNet.SignalR.SystemWeb (≥ 1.0.0-rc1)'.
Attempting to resolve dependency 'Microsoft.AspNet.SignalR.Owin (≥ 1.0.0-rc1)'.
Attempting to resolve dependency 'Microsoft.AspNet.SignalR.Core (≥ 1.0.0-rc1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.4)'.
Attempting to resolve dependency 'Owin (≥ 1.0)'.
Attempting to resolve dependency 'Microsoft.Owin.Host.SystemWeb (≥ 1.0.0-rc1)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
You are downloading Microsoft.AspNet.SignalR.Core from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/aspnet_and_web_tools_2012_EULA_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.SignalR.Core 1.0.0-rc1'.
Successfully installed 'Owin 1.0'.
You are downloading Microsoft.AspNet.SignalR.Owin from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/aspnet_and_web_tools_2012_EULA_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.SignalR.Owin 1.0.0-rc1'.
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully added 'Microsoft.AspNet.SignalR.Core 1.0.0-rc1' to OProject.
Successfully added 'Owin 1.0' to OProject.
Successfully added 'Microsoft.AspNet.SignalR.Owin 1.0.0-rc1' to OProject.
Value does not fall within the expected range.
Successfully uninstalled 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully uninstalled 'Microsoft.AspNet.SignalR.Owin 1.0.0-rc1'.
Successfully uninstalled 'Owin 1.0'.
Successfully uninstalled 'Microsoft.AspNet.SignalR.Core 1.0.0-rc1'.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'Microsoft.Web.Infrastructure'.
At line:1 char:16
+ Install-Package <<<< Microsoft.AspNet.SignalR -pre
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
答案 0 :(得分:1)
确保您也在运行最新的Nuget。你是VS2012还是VS2010
答案 1 :(得分:1)
我有同样的问题。对我来说,似乎我已经有了包的目录,但里面没有DLL文件。以下是我如何解决它:
C:\ MySolution \包\ Microsoft.Web.Infrastructure.1.0.0.0