Using SignalR Past ASP.NET 5 Beta 5

If you've been using SignalR in the ASP.NET 5 betas, you may have noticed that after beta 5 you no longer can pull the NuGet package from the main repository. This is because SignalR has been put on hold until more of the ASP.NET 5 stack is complete. And while the ASP.NET team has said they'll keep it up-to-date enough to bring in to the later betas, there's a trick to actually getting that working.

Visual Studio

To pull the NuGet package, you'll have to pull from the unstable myget dev feed. To set this up in Visual Studio, you'll just have to add a new package source in your package manager configuration:



The settings I used:

After you've added that package source, you should be able to upgrade SignalR to the latest beta in your package.json files. Keep in mind, this only works for your local environment. If you want to deploy this, you need to add a flag to your DNU process.

DNU and Deployment

If you're using the handy script provided by Microsoft to publish your web app, you just need to make a minor modification to your Prebuild.ps1 file to pull from the new package source:

# run DNU restore on all project.json files in the src folder including 2>1 to redirect stderr to stdout for badly behaved tools
Get-ChildItem -Path $PSScriptRoot\src -Filter project.json -Recurse | ForEach-Object { & "dnu" "restore" "$_.FullName" "--fallbacksource" "" "2>1" }

If you're not using their script, you just need to modify your DNU command to include the --fallbacksource portion.


Once SignalR gets promoted to the main feed again, you can just reverse these steps and you should be back to normal.

Hope that helps someone! We were scratching our heads for a while.