且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载文件或程序集"..."或其依赖项之一.文件或目录已损坏,无法读取从VS15 Comunity到Professional

更新时间:2022-04-15 21:22:35

此错误与您的项目无关.文件 Microsoft.VisualStudio.Web.PageInspector.Loader 是Visual Studio的一部分.新笔记本电脑是否具有已删除的其他版本的Visual Studio(例如2012)?最简单的解决方案是完全卸载Visual Studio的所有版本,重新启动计算机,然后安装所需的版本(例如Visual Studio 2015社区).

This error has nothing to do with your project. The file Microsoft.VisualStudio.Web.PageInspector.Loader is part of Visual Studio. Did the new laptop have different versions of Visual Studio (e.g. 2012) which have been removed? The easiest solution is to uninstall all versions of Visual Studio completely, reboot the machine, and then install the version that you want (e.g. Visual Studio 2015 Community).

或者,您必须自己修复它.为此,您必须在以下文件夹中修改计算机的web.config文件:

Alternatively, you'll have to fix it by yourself. To do so, you have to modify the machine web.config file in these folders:

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

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

在文本编辑器中打开web.config文件,搜索对 Microsoft.VisualStudio.Web.PageInspector.Loader 的所有引用并将其删除.然后重新启动Visual Studio并运行您的项目.

Open the web.config file in a text editor and search for all references to Microsoft.VisualStudio.Web.PageInspector.Loader and delete them. Then restart Visual Studio and run your project.

另一个选择是修改项目中的web.config.不建议这样做,但是可以使用.在下面添加行:

Another option is to modify the web.config in your project. This is not recommended, but it will work. Add the lines bellow:

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