尝试遵循本教程,以使基本SignalR工作:https://learn.microsoft.com/en-us/aspnet/core/tutorials/signalr?tabs=visual-studio&view=aspnetcore-2.2
我正在使用VisualStudio15.9.7
本教程包括下面的说明,但是当我遵循它们时,模态窗口就消失了,没有任何类型的消息,而且我在任何地方都没有signalr库。lib/signalr文件夹没有解压缩到我的应用程序中。没什么。
我环顾四周,试图找出从哪里手动下载。没什么。
我试着运行所有包控制台命令来尝试获取signalR。如下所示: npm install @aspnet/signalr
没什么。
是否有一种简单而有效的方法来获得这些js库?
In Solution Explorer, right-click the project, and select Add > Client-Side Library.
In the Add Client-Side Library dialog, for Provider select unpkg.
For Library, enter @aspnet/signalr@1, and select the latest version that isn't preview.
Add Client-Side Library dialog - select library
Select Choose specific files, expand the dist/browser folder, and select signalr.js and signalr.min.js.
Set Target Location to wwwroot/lib/signalr/, and select Install.
Add Client-Side Library dialog - select files and destination
LibMan creates a wwwroot/lib/signalr folder and copies the selected files to it.发布于 2019-11-19 07:25:55
首先,您可以尝试更新Visual并检查它是否可以帮助解决问题。
此外,要将SignalR客户端库添加到项目中,还可以使用LibMan Cli命令。
dotnet工具安装Microsoft.Web.LibraryManager.Cli -g
libman install @aspnet/signalr -p unpkg -d wwwroot/lib/signalr -files/browser/signalr.js--d
https://stackoverflow.com/questions/58925535
复制相似问题