【问题标题】:Could not load file or assembly '...' or one of its dependencies. The file or directory is corrupted and unreadable From VS15 Comunity to Professional无法加载文件或程序集“...”或其依赖项之一。文件或目录已损坏且无法读取 从 VS15 社区到专业
【发布时间】:2018-04-10 12:58:32
【问题描述】:
我正在 Visual Studio Community 2015 中处理 webforms 项目(3 层)。
我已将我的项目从一台笔记本电脑移动到另一台笔记本电脑,但现在该项目没有运行。
注意:另一台笔记本电脑安装了 Visual Studio Professional 2015。
在所有页面的第一行下面显示蓝色下划线,如下所示:
还有这个错误:
我使用的是 Windows 10 专业版。
任何帮助将不胜感激!
【问题讨论】:
标签:
c#
asp.net
visual-studio
visual-studio-2015
windows-10
【解决方案1】:
此错误与您的项目无关。文件 Microsoft.VisualStudio.Web.PageInspector.Loader 是 Visual Studio 的一部分。新笔记本电脑是否有已删除的不同版本的 Visual Studio(例如 2012)?最简单的解决方案是完全卸载 Visual Studio 的所有版本,重新启动机器,然后安装您想要的版本(例如 Visual Studio 2015 Community)。
或者,您必须自己修复它。为此,您必须修改这些文件夹中的机器 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 并运行您的项目。
另一个选择是修改项目中的 web.config。不建议这样做,但它会起作用。添加以下行:
<compilation>
<assemblies>
<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>