Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Total Post:214

Points:1642
C#
 8056  View(s)
Ratings:
Rate this:
Hey Guys,

After deploying website on IIS, I am getting following error.
I have one main directory and then one inside of it and trying to access second one which is using .NET Framework Version 3.5, parent one using .NET Framework 4.0.

Please help


Could not load file or assembly

  1. Post:127

    Points:915
    Re: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Add following references or deploy dlls to your bin folder


  2. Add the following references to the project:

    • Microsoft.Web.Infrastructure
    • System.Web.Razor
    • System.Web.WebPages.Razor
    • System.Web.WebPages.Deployment
  3. Set the property Copy Local to True for the following references:

    • System.Web.Helpers
    • System.Web.MVC
    • System.Web.WebPages
    • Microsoft.Web.Infrastructure
    • System.Web.Razor
    • System.Web.WebPages.Razor
    • System.Web.WebPages.Deployment
  4. cheers!!

Answer