简体   繁体   中英

Where is the default setting for Managed Legacy (v3.5, v3.0, v2.0) vs Managed Legacy (v4.5, v4.0) when debugging?

When attaching to a .exe process, using the same exact solution, one PC defaults to using Managed Legacy (v3.5, v3.0, v2.0) and another PC to Managed Legacy (v4.5, v4.0). Why would the setting be different between machines? Is there a setting somewhere I can change?

The problem is that Managed Legacy (v3.5, v3.0, v2.0) is causing breakpoints not to be hit when using .NET4. I can detach and re-attach as Managed Legacy (v4.5, v4.0) manually but that's ridiculous.

Is there a way to specify one before the process starts?

Found the problem. There was an XML configuration file (.config) that was setting the .NET version. The solution was to delete the file.

Here were the contents of the XML

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

After deleting the file, Managed (v4.5, v4.0) is now the default.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM