[RESOLVED]Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

I have MVC3 application. I am not using Razor. Locally its working fine. But its throwing above excpetion in deployment machine.

Strangely, there is another MVC3 application which is working perfectly. Please someone help.

did you deploy Razor dll?

Please check the web.config you are using wrong version of Razor. I think it should be similar to this

      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>

Hi Shadakshari,

Thanks for your post.

You can follow the
steps here
.It had the same issue as Victor
below
, so I suggest you also add these:

Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages.Deployment
System.Web.WebPages.Razor

Hope this can be helpful.

Best Regards,

Eileen

Open ‘Package Manager Console’ in Visual Studio
Uninstall-Package Microsoft.AspNet.Mvc
Install-Package Microsoft.AspNet.Mvc

http://stackoverflow.com/questions/11000506/could-not-load-file-or-assembly-system-web-webpages-razor-version-2-0-0-0

Leave a Reply