17
votes

I'm brand new to SignalR and I've been following along with the Microsoft Academy MVC 4 tutorials. I've hit a road block when it comes to installing SignalR.

Steps: Create a brand new MVC4 web application (Internet Application), Build, Go to the NuGet package manager and find "Microsoft ASP.NET SignalR", Press install. I get the following error message: "Unable to uninstall 'Newtonsoft.Json 5.0.8' because 'Microsoft.AspNet.WebApi.Client 4.0.20710.0' depends on it."

If I attempt a second time I get the follow error: "Could not install package 'Microsoft.Owin.Security 2.0.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

I've tried all of the built in templates already. The demo seems to be using VS2012 (which I am) so I don't understand what the issue is. I did notice that when I pause the demo they are installing v1.1.3 while mine is at v2.0.0

I'm semi-new to MVC, brand new to nuget and SignalR. If anyone has any tips or alternatives I'd appreciate it.

3
If you're going to use SignalR on a production server you should reconsider to use .NET 4.5 and take the benefits from 2.x on SignalR (see the release notes and you'll get why), also even mono is supporting .NET 4.5 :) - Gui
Good points. I was just learning SignalR so I wanted to get it working with the tutorial. I also tried updating my project to use 4.5 and it broke compatibility with some of the other tutorial dependencies. - BrianLegg
If i were you, i would start another blank solution with .NET 4.5 and try to get that tutorial done but never give up SignalR 2.x! - Gui

3 Answers

36
votes

It seems that a couple of days ago (17th October), a new version of SignalR was released (version 2.0.0), which uses a new version of Microsoft.OWIN.Security that requires .NET4.5. To get around this, I simply installed the previous version (1.1.3) using the following Package Manager Console command:

install-package Microsoft.AspNet.SignalR -Version 1.1.3
3
votes

My understanding of Nuget packages is a bit ropey, but I managed to overcome this (Owin) issue by

  1. Using Nuget Package explorer to open the Microsoft.Owin.Security 2.0.1 package from an online feed

  2. Moving the DLL and XML file out of the .Net 4.5 folder and directly into lib

  3. Saving the package locally

  4. Adding local version of the package

I'm currently using VS2010, but everything was working fine yesterday in VS2012. I wanted to use nuget rather than just dropping DLLs into the bin folder, as it makes things easier later on when I need to clean up and do things properly.

The above is something of a hack and I fully expect the real experts on this stuff to recommend I be placed in a sack and beaten with a stick for even suggesting it. However, I needed to get it working right now for a demo.

0
votes

I'd just solved this problem by just upgrading my project .net FrameWork from 4.5 to 4.7.2 and it's gone