当前位置: 首页 > 知识库问答 >
问题:

无法加载文件或程序集'Microsoft. VisualStudio. Web. PageExpltor. Loader

景国兴
2023-03-14
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

共有3个答案

羿经武
2023-03-14

我遇到了同样的问题,但不是在我的开发机器上,而是在托管服务器上。

C:\Windows\Microsoft。NET \ Framework \ v 4 . 0 . 30319 \ Config \ web . Config C:\ Windows \ Microsoft。NET \ framework 64 \ v 4 . 0 . 30319 \ Config \ web . Config

我能够通过添加下面的代码来修复它到我的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>

或者从框架目录中的web.config文件中移除对此程序集的引用。

我从来没有在那里安装VS,也从来没有在那里安装过PageInspector。知道为什么这些配置引用它们吗?

西门嘉石
2023-03-14

不需要删除这些行< br >只需关闭Visual studio,然后以管理员权限重新打开即可。

东郭弘方
2023-03-14

我刚刚遇到了同样的问题,罪魁祸首是我卸载了Visual Studio Express 2012。它可能是Visual Studio的任何版本,因为对此答案的评论表明Visual Studio 2019仍然存在该问题。我的总体操作顺序是:

    < li >已安装Visual Studio Express 2012(很久以前) < li >愉快地使用Visual Studio Express 2012多个月 < li >已安装Visual Studio 2013 Premium < li >愉快地使用Visual Studio 2013 Premium数周 < li >已卸载Visual Studio Express 2012 < li >错误

我不能100%确定它的原因,或者Visual Studio版本的哪些组合会表现出这种行为。但对我来说,解决方案是编辑框架目录中的rootweb.config文件:

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

(对于不同的框架版本,您可能有不同的文件夹。

并删除节点:

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

注意不要删除任何与这些父节点位于同一行上的打开/关闭父节点。

这为我解决了问题。

 类似资料:
  • 我试图托管一个webproject,但是当服务器试图编译它时,我得到以下错误: 未处理的异常:System.io.FileLoadException:无法加载文件或程序集“Microsoft.codeAnalysis,版本=1.1.1.0,Culture=Neutrice,PublicKeyToken=31BF3856AD364E35”或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。(来

  • 我在我的项目中使用的是umbraco 4.11.3。我的项目在Windows 7上运行良好,并在visual studio 2012上运行。但它在Win 8中从visual studio 2012运行时并不工作! 错误是: 无法加载文件或程序集“System.Web”。Mvc,Version=2.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e

  • 问题内容: 我正在使用c#和数据库MySQL开发桌面应用程序。当我在计算机上安装其安装程序时,它可以正常工作,但是当我在其他计算机上安装它的安装程序时,尝试访问数据库时会出现以下异常。我用来与MySQL通信。 无法加载文件或程序集“ MySql.Data,版本= 6.2.2.0,区域性=中性,PublicKeyToken = c5687fc88969c44d”或其依赖项之一。该系统找不到指定的文件

  • 问题内容: 我完全不知所措-我仍然什至没有真正理解的地方遇到超级奇怪的问题…我正在运行Entity Framework 4.1,MySql 5.xx和MySql Connector为6.4.4版-一切正常但是在本地,只要我上传到服务器,就会收到: 我很困惑,我很肯定我在Bin目录中有MySql 6.4.4 dll,我的Web.config也对版本6.3.6进行了零引用- 我已经在整个项目中(使用全

  • 问题内容: 更新到新软件包Microsoft.EntityFrameworkCore.SqlServer 1.1.2之后,尝试创建DBContext时出现错误: 发生System.IO.FileLoadException HResult = 0x80131040 消息=无法加载文件或程序集’Microsoft.Extensions.DependencyInjection.Abstractions,

  • 在 win7 上,我的应用程序工作正常。但是当我尝试在win8上运行它时,我收到一个错误。 无法加载文件或程序集“系统.Web.WebPages.Razor,版本=2.0.0.0 System.Web.WebPages.Razor.dll 在发布期间是本地复制的。如果这很重要,我不久前从 mvc4 迁移到 mvc5。 堆栈跟踪: [FileLoadException: 无法加载文件或程序集 'Sy