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.

Tarun Kumar

Total Post:214

Points:1642
Posted by  Tarun Kumar
C#
 6213  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




  1. Uttam Misra

    Post:125

    Points:897
    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!