Where is MapHttpRoute?

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

After installing Visual Studio 2012, you might be surprised that some strange error might occur. But don’t worry, this is just consequence of open source strategy which now boundless hundreds of assemblies together. People who write software for longer than 10 years know, that we already had similar story called DLL-Hell. Fortunately we have now NuGet which wraps up the hell into the purple world.

To solve the error shown below add NuGet reference to “Microsoft.AspNet.WebApi.WebHost”.

Method 'GetVirtualPath' in type 'System.Web.Http.WebHost.Routing.HostedHttpRoute' from assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.

This error will occur if you add reference to some other NuGet package like WebApi.Core or similar :).

 

Another interpretation of the similar error:
RouteTable.Routes.MapHttpRoute(...)

 

Now you might ask yourself, how to know which package is the right one? No way. You just have to know it.


Posted Sep 26 2012, 03:35 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.