找不到Visual Studio页面检查器程序集

Nan*_*tte 5 .net c# asp.net-mvc .net-assembly page-inspector

我有一个ASP MVC项目,我没有,但我需要将其上传到IIS服务器上.这有效,但当我上传并访问该网站时,我收到此错误:

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 system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)

一切都在本地工作,但不在服务器上.我尝试过的事情:

  • 修复.NET Framework
  • 尝试从.NET Framework webconfig(位于:C:\ Windows\Microsoft.NET\Framework64\v4.0.30319\Config)文件中删除2行但不能因为文件正在使用中.由于Access Denied错误导致无法停止进程

我发现删除这两行可能是一个解决方案,但我不能删除它们:

<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" />
Run Code Online (Sandbox Code Playgroud)

有什么我想念的吗?任何帮助深表感谢!谢谢

Mic*_*xon 10

尝试将此行添加到您的网站web.config.配置文件从.NET库继承到您的站点,然后继承您站点中的文件夹.因此,您的站点将覆盖.NET框架配置.

<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Run Code Online (Sandbox Code Playgroud)

编辑

这条线应该到这里......

<configuration>
   <system.web>
      <compilation>
         <assemblies>
            <remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
         </assemblies>
      </compilation>
   </system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)

应该注意的是,assembly属性中的所有垃圾都可能需要与在.NET框架配置中添加它的那个垃圾相同.