My local version of my code runs just fine. But when I do a web deploy I am getting the following exception:
Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The relevant stack trace line is
[FileLoadException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] Microsoft.Web.WebPages.OAuth.PreApplicationStartCode.Start() +0
This seems to be related to the fact that the Nuget Package for Razor is version 3.0 but the DotNetOpenAuth package uses version 2.0
Also the issue only happens when I deploy to my Azure website. (I am currently using the free website and not the webrole/workrole stuff). I use a webdeploy and it was working ok in previous versions but I believe this has something to do with nuget packages.
Update: I am unable to solve this. I have tried to deploy via FTP that deleted the whole folder prior to deployment but this did not work either. Nuget has been a nightmare.