简体   繁体   English

为什么在逐步使用C#代码时,Visual Studio 2010可以在C ++模式下进行漂亮打印?

[英]Why is Visual Studio 2010 pretty-printing in C++ mode while stepping through C# code?

I am encountering a strange issue. 我遇到了一个奇怪的问题。 i have all the latest updates in my PC. 我在我的电脑上有所有最新的更新。 My OS is Windows 7. Can anyone help me out with this? 我的操作系统是Windows 7.任何人都可以帮我解决这个问题吗? I have tried resetting the Visual studio. 我试过重置Visual Studio。

And here is the exact problem blown up to make it easier to see: 这里有一个确切的问题,以便更容易看到:

关于这个问题的特写

I had the exact same issue. 我有完全相同的问题。 To confirm, look in the call stack at ac# stack frame. 要确认,请查看ac#stack frame中的调用堆栈。 For me it said C++ instead of C#. 对我来说,它说C ++而不是C#。 For anyone else with this problem: 对于有此问题的其他人:

I fixed it by looking at the compatibility settings for VSLauncher.exe, Devenv.exe, and the shortcut to Devenv.exe. 我通过查看VSLauncher.exe,Devenv.exe和Devenv.exe快捷方式的兼容性设置来修复它。 One of them (VSLauncher.exe) has compatibility mode set to Windows XP. 其中一个(VSLauncher.exe)具有设置为Windows XP的兼容模式。 I turned that off and it was fixed. 我关掉了它,它被修复了。

The Hex display is because you chose that option (clicked on the toolbar), click on it again to switch back to the normal display. 十六进制显示是因为您选择了该选项(单击工具栏上的),再次单击它以切换回正常显示。 The C++/CLI type is not related to the Hex dispaly issue though. 但是,C ++ / CLI类型与Hex显示问题无关。

在此输入图像描述

I ran into this issue as well, the debugger picked up c# and c++ in all c# projects. 我也遇到了这个问题,调试器在所有c#项目中都选择了c#和c ++。 I'm running windows 7 64 bit. 我正在运行Windows 7 64位。

I resolved this issue by going to the compatibility tab of the properties of the shortcut. 我通过转到快捷方式属性的兼容性选项卡解决了此问题。 It was checked as running as windows xp service pack 3. I unchecked that and still kept run as administrator checked. 它被检查为运行为Windows XP Service Pack 3.我取消选中它仍然保持运行管理员检查。 Suddenly my debugger picked all of it up as c# again. 突然,我的调试器再次选择了所有这些作为c#。

I solved the issue by re-installing the OS. 我通过重新安装操作系统解决了这个问题。 But I do remember that i was installing lot of software while i was installing the Visual Studio that. 但我确实记得我在安装Visual Studio时安装了很多软件。 might have corrupted the OS file 可能已损坏操作系统文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Python漂亮打印C# - Pretty-printing C# from Python 为什么 Visual Studio 代码可以将 C# 正确打印到终端,但没有输出? - Why is visual studio code printing C# to terminal correctly, but not output? 在Visual Studio 2010 C#中发布代码 - Releasing a code in visual studio 2010 C# 使用Visual Studio 2010 C#进行调试时,如何避免进入常用功能? - When debugging using Visual Studio 2010 C#, how to avoid stepping into common functions? 在 Visual Studio 2008 中单步执行 C# 时如何找到方法调用者? - How can I find a method caller when stepping through C# in Visual Studio 2008? 在Visual Studio 2010(C#)中进行编译之前,请通过外部应用程序运行代码 - Run code through external application before compiling in visual studio 2010 (C#) 通过Visual Studio 2010 C#访问sql 2008数据库 - Accessing sql 2008 database through visual studio 2010 C# 为什么Visual Studio 2010 C#Express格式无法正确嵌套代码? - Why can't Visual Studio 2010 C# Express format nested code correctly? 正则表达式电子邮件代码不匹配。 C#Visual Studio 2010 - Regex email code not matching. C# visual studio 2010 Visual Studio C#2010 Express代码编辑器和“ - ”字符 - Visual Studio C# 2010 Express code editor and “-” characters
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM