Breakpoint Failed to Bind - Visual Studio 2015

后端 未结 24 897
后悔当初
后悔当初 2020-11-28 07:47

I just upgraded from Visual Studio 2013 to 2015 and now I am having trouble with breakpoints.

It\'s a hit or a miss where break points will actually work and if I se

相关标签:
24条回答
  • 2020-11-28 08:10

    I had this problem. I ran a performance profiling session which modified the Web.config file with settings for the performance monitor:

    <appSettings>
       <add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools\vsinstr.exe"/>
    </appSettings>
    
    
    <compilation debug="true" targetFramework="4.5" 
          assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
       ...
    </compilation>
    
    
    <runtime>
       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
             <assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
             <codeBase version="16.0.0.0" href="file:///D:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio/Shared/Common/VSPerfCollectionTools/vs2019/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL"/>
          </dependentAssembly>
          <dependentAssembly>
             <assemblyIdentity name="VsWebSite.Interop" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
             <codeBase version="8.0.0.0" href="file:///D:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio/Shared/Common/VSPerfCollectionTools/vs2019/VsWebSite.Interop.DLL"/>
          </dependentAssembly>
       </assemblyBinding>
    </runtime>
    

    This broke my ability to stop at breakpoints. When I reverted back to the original Web.config (removed the Performance Profiler settings), the breakpoints started working again.

    0 讨论(0)
  • 2020-11-28 08:12

    I had to modify the web.config file to enable debugging. Change this:

    <compilation debug="true" targetFramework="4.5.2" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    

    to:

    <compilation debug="true"/>
    
    0 讨论(0)
  • 2020-11-28 08:14

    I run performance on my solution and that added this to my web.config

    <compilation debug="true" targetFramework="4.5" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
    

    the assemblyPostProcessorType is the problem, I deleted it and that solved my problem

    0 讨论(0)
  • 2020-11-28 08:14

    I encountered the binding breakpoint errors today. And I've solved my problem doing belows.

    If your all debug configurations aren't correct you can't fix the problem doing belows.

    1. Clean Project
    2. If the output path is different from bin folder, replace it to the bin folder(this is the most important rule)
    3. Rebuild

    Maybe this solution helps someone.

    0 讨论(0)
  • 2020-11-28 08:14

    Clean the entire solution before trying any of the other solutions. After trying almost everything else said in earlier answers, and restarting visual studio several times, just cleaning the solution did the trick!

    0 讨论(0)
  • 2020-11-28 08:15

    I had the same problem, but hadnt realised that "Debug" had changed to "Release" on the debug tool bar(usually directly under the menu). So I set it to "Debug" it worked.

    0 讨论(0)
提交回复
热议问题