Could not load file or assembly 'Microsoft.Vis

2019-01-21 15:42发布

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

10条回答
Root(大扎)
2楼-- · 2019-01-21 16:08

I've ran into this error while trying to run an ASP.NET project in VS2013 after having uninstalled a VS2015 preview. Repairing the VS2013 installation seems to have solved the problem.

查看更多
【Aperson】
3楼-- · 2019-01-21 16:10

No need to remove those lines
Just close and reopen the Visual studio with Admin privileges.

查看更多
姐就是有狂的资本
4楼-- · 2019-01-21 16:12

I just ran into the same problem, and the culprit was my uninstalling of Visual Studio Express 2012. (Possible that it might be any version of VS2012.) My overall order of operations was:

  • Installed Visual Studio Express 2012 (long time ago)
  • Used Visual Studio Express 2012 happily for many months
  • Installed Visual Studio 2013 Premium
  • Used Visual Studio 2013 Premium happily for weeks
  • Uninstalled Visual Studio Express 2012
  • ERROR

I'm not 100% certain on the cause of it, or what combinations of VS 2012/2013 would 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

And remove the lines:

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

This resolved the issue for me.

查看更多
唯我独甜
5楼-- · 2019-01-21 16:12

Try updating your Microsoft.ApplicationInsights nuget package. This also installs other dependencies. I ran into this problem when I had to change my Target Framework.

  1. Tools > NuGet Package Manager > Manage NuGet Packages for Solution...
  2. search for "applicationinsights"

or run

Install-Package Microsoft.ApplicationInsights
查看更多
Anthone
6楼-- · 2019-01-21 16:22

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

modifying the following two files, and removing Microsoft.VisualStudio.Web.PageInspector.Loader resolved the issue.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
查看更多
劳资没心,怎么记你
7楼-- · 2019-01-21 16:23

For those who might end up here, try removing the following line in the Web.Config file of your Project while debugging <identity impersonate="true" userName="blah" password="blah">

It took time until I finally came across the following thread: Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues

查看更多
登录 后发表回答