Could not load file or assembly "Microsoft.VisualStudio.Web.PageInspector.Loader

 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 module was expected to contain an assembly manifest.


 Assembly manager loaded from: C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ clr.dll
 Running under executable C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ DevServer \ 11.0 \ WebDev.WebServer40.exe
 --- A detailed error log follows. 

 === Pre-bind state information ===
 LOG: User = TTLWIN2K \ miralp
 LOG: DisplayName = Microsoft.VisualStudio.Web.PageInspector.Loader, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
  (Fully-specified)
 LOG: Appbase = file: /// C: / SVN / temp / components / src / MasterpassProxy / src / Webservice /
 LOG: Initial PrivatePath = C: \ SVN \ temp \ components \ src \ MasterpassProxy \ src \ Webservice \ bin
 Calling assembly: (Unknown).
 ===
 LOG: This bind starts in default load context.
 LOG: Using application configuration file: C: \ SVN \ temp \ components \ src \ MasterpassProxy \ src \ Webservice \ web.config
 LOG: Using host configuration file: 
 LOG: Using machine configuration file from C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ config \ machine.config.
 LOG: Post-policy reference: Microsoft.VisualStudio.Web.PageInspector.Loader, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
+80
visual-studio page-inspector
Feb 17 '14 at 12:41
source share
13 answers

I ran into the same problem and the culprit was the removal of Visual Studio Express 2012 . It is possible that this could be any version of Visual Studio, as the comments on this answer indicate that the problem still occurs with Visual Studio 2019 . My general order of operations was:

  • Installed Visual Studio Express 2012 (long time ago)
  • Used Visual Studio Express 2012 happily for months
  • Installed Visual Studio 2013 Premium
  • Used Visual Studio 2013 Premium happily for several weeks
  • Remote installation of Visual Studio Express 2012
  • MISTAKE

I am not 100% sure about the reasons for this or which combinations of Visual Studio versions will exhibit this behavior. But the solution for me was to edit the root web.config files in the framework directories:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config 

(You may have different folders for different versions of the framework.)

And remove the nodes:

 <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" /> 

Be careful not to remove any opening / closing parent nodes that are also on the same line (s) as these.

This solved the problem for me.

+174
Apr 24 '14 at 16:17
source share

No need to delete these lines
Just close and open Visual Studio with administrator privileges .

+18
Apr 20 '16 at 7:25
source share

I have the same problem, but not on my development machine, but on the hosting server.

C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config \ web.config C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Config \ web.config

I managed to fix this by adding the below code to my web.config

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

or by removing the link to this assembly from the web.config files in the frame directories.

I never installed VS there, and I never had PageInspector installed. Any idea why these configs reference them?

+14
Dec 15 '16 at 16:43
source share

Update: fixed in Visual Studio 2019 version 16.0.3 in accordance with this page .

If this happens after upgrading to Visual Studio 2019 RC, the following solution will help:

  1. Find the download cache directory enter image description here
  2. Use Explorer or better to find AspNetDiagnosticPack.msi in this directory.
  3. Run (double-click) the AspNetDiagnosticPack.msi file (this will install this MSI).

Workaround found here

+5
Mar 11 '19 at 16:40
source share

For those who may be here, try deleting the following line in your project's Web.Config file while debugging <identity impersonate="true" userName="blah" password="blah">

It took a while until I finally came across the following thread: Failed to load the file or assembly or one of its dependencies. Access denied. The problem is random, but after its occurrence it continues

+2
Oct 20 '14 at 20:23
source share

I encountered this error while trying to start an ASP.NET project in VS2013 after removing the VS2015 preview. Repairing the VS2013 installation seems to have solved the problem.

+2
Jul 10 '15 at 21:52
source share

I had this problem after installing Visual Studio 2019 (while 2017 was still installed). This is caused by a missing component - AspNetDiagnosticPack.msi - which cannot install the required package in C:\ProgramData\Microsoft\VisualStudio\Packages\

The solution that worked for me was as follows:

  • Close Visual Studio

  • Download the package from:

https://download.visualstudio.microsoft.com/download/pr/e13d544f-5a3c-4bb3-9a7c-1e56b1f90e10/f8e5888ff01a7009ef8c2ef16aa02ab9/aspnetdiagnosticpack.msi

  • Run the installer and install.

That should fix it.

Further information can be found at : https://developercommunity.visualstudio.com/content/problem/398640/could-not-load-file-or-assembly-microsoftvisualstu-7.html.

+2
Apr 18 '19 at 8:22
source share

I removed the dll from gac and started working. I don't know where these dll came from. If you have 2 or more versions of the visual studio, reinstall the latest version.

0
Feb 17 '14 at 13:46
source share

Try updating the Microsoft.ApplicationInsights nuget package. It also installs other dependencies. I ran into this problem when I had to change the target structure.

  • Tools> NuGet Package Manager> Managing NuGet Packages for Solution ...
  • search "applicationinsights"

or run

 Install-Package Microsoft.ApplicationInsights 
0
Aug 14 '16 at 2:42 on
source share

Had a similar problem (another build), and for me it was the missing line in the web.config file on the machine. A line that I think allows you to load a web server (any?) Dll. I had to add "*" to the list of builds in the web.config file:

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config 

Like this

  <compilation> <assemblies> ... <add assembly="*" /> </assemblies> </compilation> 

To find it, I had to compare the file with the file from the production server. So it seems to me that this is really a download failure, but to determine why it fails, we need to be Sherlook H .. I usually use a tool like ProcessMonitor to find out why I got a download error, but this time, of course , this did not give me a useful conclusion. IIS never tried to download the assembly!

0
Nov 29 '17 at 19:09
source share

If you do not see web.config in both ways: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

The "Web" file is located in " C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\ ", which I really want to show you. This is Web.config , you should open it with: notepad ++ ... and delete:

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

I will end my problem with them.

0
Dec 22 '17 at 13:06 on
source share

Our project for a long time had (incorrectly) a link to PageInspector.Loader.dll in the GAC:

  <ItemGroup> <Reference Include="Microsoft.VisualStudio.Web.PageInspector.Loader"> <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll</HintPath> </Reference> </ItemGroup> 

It worked for a while, but recently deploying to Azure caused the error "Cannot find the compilation library location for Microsoft.VisualStudio.Web.PageInspector.Loader."

We found and removed the link from the .csproj file , and the problem was fixed.

0
Aug 20 '19 at 13:14
source share

he solved the problem at my end by applying the approved solution in this thread.

changing the following two files, and removing Microsoft.VisualStudio.Web.PageInspector.Loader fixes the problem.

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config 
-four
Oct 06 '16 at 11:27
source share



All Articles