[英]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). 当使用相同的精确解决方案附加到.exe进程时,一台PC默认使用托管旧版(v3.5,v3.0,v2.0),另一台PC默认使用托管旧版(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. 问题在于,使用.NET4时,“受管旧版”(v3.5,v3.0,v2.0)导致无法命中断点。 I can detach and re-attach as Managed Legacy (v4.5, v4.0) manually but that's ridiculous.
我可以手动分离并重新附加为Managed Legacy(v4.5,v4.0),但这很荒谬。
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.
有一个XML配置文件(.config)正在设置.NET版本。 The solution was to delete the file.
解决的办法是删除文件。
Here were the contents of the XML 这是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. 删除文件后,托管(v4.5,v4.0)现在是默认设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.