Wednesday, October 29, 2008

Could not load type 'System.Web.Routing.StopRoutingHandler' from assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

If you have upgraded from ASP.Net MVC Preview 3 to ASP.Net MVC Preview 5 and are recieving this error:

Could not load type 'System.Web.Routing.StopRoutingHandler' from assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The solution I found was from this ASP.Net Forums Post, about a Runtime error after upgraded to preview 5

Solved!

I had to remove and re-add the updated DLLs to my GAC:

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Routing.dll
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 5\Assemblies>gacutil -if System.Web.Abstractions.dll

2 comments:

Anonymous said...

Great, your solution worked and saved me some serious hairgraying. :-D
Cheers, mate!

reflute said...

You are welcome. I am not sure why upgrading from Preview3 to Preview5 causes this defect, but I found on machines that upgraded to Preview4 or directly from Preview3 to the Beta did not have this issue.

Pretty isolated, shouldn't effect anyone again, just me and you :)