我刚刚从Visual Studio 2013升级到2015,现在我遇到了断点问题.
这是一个命中或遗漏,其中断点将实际工作,如果我在调试时设置一个我得到错误:
断点无法绑定.
任何帮助,将不胜感激.我准备好在2015年放弃并回去.
c# breakpoints visual-studio visual-studio-2013 visual-studio-2015
今天我只是在Instrumentation模式下使用visual studio的分析器来分析我的WCF应用程序.后来我需要发布到我的网络服务器,突然间我收到一条错误,说无法找到Microsoft.VisualStudio.Enterprise.AspNetHelper文件路径.
当我查看我的web.config时,我看到通过分析会话添加了以下行.
<system.web>
<compilation targetFramework="4.0" debug="true" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter,
Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<runtime>
<generatePublisherEvidence enabled="false"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<codeBase version="12.0.0.0" href="file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL"/>
</dependentAssembly></assemblyBinding></runtime>
<appSettings>
<!--<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\vsinstr.exe"/>-->
</appSettings></configuration>
Run Code Online (Sandbox Code Playgroud)
很明显它在服务器上寻找一些DLL,但由于这条路径在服务器上无效,因为没有安装VS,它会引发异常.为什么会发生这种情况以及如何避免在web.config中添加这些行?每次进行分析会话时删除这些行都会非常麻烦.
更新:此问题也发生在VS2015上.如果启动VS分析工具,它会在web.config中添加一行
> <add
> key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation"
> value="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team
> Tools\Performance Tools\vsinstr.exe"/> <dependentAssembly>
> <assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper"
> culture="neutral"/>
> <codeBase version="14.0.0.0" href="file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2014.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL"/></dependentAssembly>
Run Code Online (Sandbox Code Playgroud)
如果您发布到服务器,您将在下面收到此错误
Run Code Online (Sandbox Code Playgroud)Configuration error说明:处理此请求所需的配置文件时发生错误.检查下面的特定错误详细信息并相应地修改配置文件.
分析器错误消息:文件或程序集'Microsoft.VisualStudio.Enterprise.AspNetHelper,Version = 14.0.0.0,Culture = neutral,PublicKeyToken ="或其中一个依赖项未找到.系统找不到指定的文件.
来源错误:
服务器上发生应用程序错误.由于此应用程序的当前自定义错误设置,可以显示远程(出于安全原因)应用程序错误的详细信息.但是,可以通过本地服务器上运行的浏览器查看它们.
源文件:C:\ www\web.config行:52
加载跟踪程序集:可以通过以下信息确定,无法加载程序集Microsoft.VisualStudio.Enterprise.AspNetHelper,Version …
profiler web-config visual-studio-2013 visual-studio-2015 visual-studio-2017