SignalR and MVC bundle

后端 未结 5 1197
迷失自我
迷失自我 2020-12-15 17:52

I\'m trying to use SignalR with MVC bundle, but having problem finding out how to include the /signalr/hubs script into the bundle. For now I have to insert the path in betw

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 18:14

    From asp.net, using the SignalR.Utils NuGet package, I found that I needed to be in the directory with the DLL that has the hub in it:

    (assuming you have a standard solution structure and are using 2.2.0 of SignalR.Utils)

    cd C:\YourSolution\YourProjectWithTheHub\bin\Debug
    ..\..\..\packages\Microsoft.AspNet.SignalR.Utils.2.2.0\tools\signalr.exe ghp
    

    After running the tool, there will be a server.js file in the directory you ran it from (in this case, Debug).

    (Note: I couldn't get it to work when specifying the path with the /p flag, and for some reason even when it does work, it creates a temp directory with the signalr.exe file in it)

提交回复
热议问题