Nanou Ponette
Nanou Ponette

Reputation: 1402

Visual Studio Page Inspector Assembly not found

I have a ASP MVC Project which I didn't make but I need to upload it on a IIS server. This works but when I upload it and visit the website I get this error:

Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Everything works locally but not on the server. Things I tried already:

I found that removing these 2 lines might be a solution but I can't remove them:

<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Is there something I am missing? Any help is much appreciated! Thx

Upvotes: 5

Views: 6774

Answers (1)

Michael Coxon
Michael Coxon

Reputation: 5510

Try adding just this line to your site web.config. The config files are inherited from the .NET base up to you site and then folders in your site. So Your site will override the .NET framework config.

<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

EDIT

The line should go here...

<configuration>
   <system.web>
      <compilation>
         <assemblies>
            <remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
         </assemblies>
      </compilation>
   </system.web>
</configuration>

It should be noted that all that junk in the assembly attribute more than likely needs to be identical to the one that adds it in the .NET framework config.

Upvotes: 11

Related Questions