未能加载文件或程序集“Microsoft.VisualStudio.Web.PageInspector.Loader

背景:

先安装了visual studio2015  ,后来想尝鲜 又装了 visual studio2017

近几天发现C盘空间不够了,就把2017卸载了.

 

出现的问题:

所有的aspx页面都打不开了

未能加载文件或程序集“Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。

 

解决方案:

  1.找到C盘下的 : web.config  文件 (在C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config中

  2.备份一份

  3.修改   <compilation>下的 <assemblies>下的

修改之前是:

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

修改为:

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

  4.保存 重启visual studio 恢复

 

中间遇到的问题:

  1.看到网上说重装 vs可以解决,  实测没有恢复.

  2.重装了net环境 没有恢复.

  3.修改的时候 发现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" />

  

解决问题时参考了最早的作者: http://www.cnblogs.com/kim0zh/p/3453453.html    非常感谢作者能提出解决方案 ,让我免于重装系统!!   做个悲伤的表情 ?_? .

 

posted @ 2017-06-24 09:35  想看名字有多长  阅读(3019)  评论(0编辑  收藏  举报