简体   繁体   English

SignalR引用缺少的NuGet软件包

[英]SignalR references NuGet package(s) that are missing

I'm trying to use SignalR with this tutorial: 我正在本教程中尝试使用SignalR

https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr

but on the stage of debugging I got this: 但是在调试阶段我得到了:

Severity Code Description Project File Line Suppression State Error This project references NuGet package(s) that are missing on this computer. 严重性代码说明项目文件行抑制状态错误该项目引用了此计算机上缺少的NuGet软件包。 Use NuGet Package Restore to download them. 使用NuGet软件包还原下载它们。 The missing file is ..\\packages\\Microsoft.Net.Compilers.1.0.0\\build\\Microsoft.Net.Compilers.props. 丢失的文件是.. \\ packages \\ Microsoft.Net.Compilers.1.0.0 \\ build \\ Microsoft.Net.Compilers.props。 SignalRChat C:\\test\\SignalRChat\\SignalRChat.csproj 103 SignalRChat C:\\ test \\ SignalRChat \\ SignalRChat.csproj 103

Not sure what I have to install and where to download it. 不知道我必须安装什么以及在哪里下载。 So I've installed: 所以我安装了:

  • Microsoft.AspNet.SignalR, Microsoft.AspNet.SignalR,
  • Microsoft.AspNet.SignalR.Core, Microsoft.AspNet.SignalR.Core,
  • Microsoft.AspNet.SignalR.JS, Microsoft.AspNet.SignalR.JS,
  • Microsoft.AspNet.SignalR.SystemWeb Microsoft.AspNet.SignalR.SystemWeb

first time I have deal with SignalR I did this just strictly according to instructions, so need to figure out 第一次使用SignalR时,我只是严格按照说明进行操作,因此需要弄清楚

So if I jump through the error, it shows me form, it does not opens localhost to enter user name, opens directly http://localhost:61202/index.html and when I write text and push send message I can't see it display below 因此,如果我跳过该错误,它将显示给我表格,它不会打开localhost输入用户名,不会直接打开http:// localhost:61202 / index.html ,当我编写文本并推送发送消息时,我看不到它显示在下面

So the error says you have a missing signalR package. 因此错误表明您缺少信号包。 Try to enable Nuget Package Restore on your solution. 尝试在解决方案上启用Nuget软件包还原。 There are a few ways of doing this. 有几种方法可以做到这一点。

  • Right click on your solution -> Click Enable NuGet Package Restore. 右键单击您的解决方案->单击“启用NuGet软件包还原”。 Nuget will try to update your missing packages on build Nuget将尝试在构建时更新丢失的软件包

OR 要么

  • Using your Nuget Package Manager by going to Tools -> Package Manager Console. 转到工具->程序包管理器控制台,使用Nuget程序包管理器。 Then type in Update-Package name of the package 然后输入包的更新包名称

OR 要么

  • right click your solution, then click Manage Nuget Packages. 右键单击您的解决方案,然后单击“管理Nuget程序包”。 Under Installed packages, you can search for SignalR just to see if it is really installed. 在“已安装的软件包”下,您可以搜索SignalR仅查看它是否已真正安装。

IF SignalR is already installed, then check to see if it is referenced in your project. 如果已经安装了SignalR,请检查是否在项目中引用了SignalR。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM