简体   繁体   English

为什么调试C#项目会显示C ++ / CLI符号?

[英]Why does debugging a C# project display C++/CLI symbols?

I've got a strange problem with some C# library and console projects (but not ones I create from scratch) where they are displaying the watches and the smart tags for debugging using C++/CLI notation (for example, showing System::Object^ where I would expect System.Object ): 我对一些C#库和控制台项目(但不是我从头创建的那些)有一个奇怪的问题,他们在那里显示手表和智能标签,用于使用C ++ / CLI表示法进行调试(例如,显示System::Object^在哪里我期望System.Object ):

C ++调试智能标记

I've tried changing the project guids, as I thought this was the problem (and some had changed), deleting obj/debug folders, restarting Visual Studio 2010, repairing Visual Studio 2010 and even the old favourite restarting Windows. 我已经尝试更改项目guids,因为我认为这是问题(有些已经改变),删除obj / debug文件夹,重新启动Visual Studio 2010,修复Visual Studio 2010甚至旧的收藏重新启动Windows。

Is there any obvious setting I'm missing that has somehow been enabled? 是否有任何明显的设置我错过了以某种方式被启用?

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#。

As this link in the comment provides an answer from Microsoft - "Cannot reproduce" I had to uninstall Visual Studio 2010 and re-install it (in fact I re-imaged my machine). 由于评论中的这个链接提供了微软的回答 - “无法重现”我不得不卸载Visual Studio 2010并重新安装它(事实上我重新成像了我的机器)。

Switching off the "HEX" option shown here did turn off hex addresses, but not the C++/CLI display. 关闭此处显示的“HEX”选项确实关闭了十六进制地址,但没有关闭C ++ / CLI显示。

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

相关问题 在C ++ / CLI / C#项目中启用“本机代码调试”会使应用程序崩溃 - Enabling “Native Code Debugging” in C++/CLI/C# project crashes application 为什么我的C#程序在运行时找不到项目中引用的C ++ / CLI DLL - Why my C# program doesn't find the C++/CLI DLL at runtime which is referenced in the project 使用本机 C++、托管 C++ cli 和 C# 解决方案在混合模式下调试 - debugging in mixed mode with native C++, managed c++ cli, and c# solution 在Visual Studio 2008中调试多线程C#-C ++ / CLI-C ++解决方案:这些线程是什么? - Debugging a Multithreaded C# - C++/CLI - C++ Solution in Visual Studio 2008: What are these threads? 从 c# 调试 c++ cli - c++ 断点未命中 - Debugging c++ cli from c# - c++ breakpoints not hit C#dll可以轻松地用于C ++ / CLI项目吗? - C# dll can be used in C++/CLI project easily? 参考 C++/CLI 项目,C++/CLI 枚举未显示在 C# 中 - C++/CLI enum not showing up in C# with reference to C++/CLI project C ++ / CLI项目如何在控制台窗口中显示消息? - How can C++/CLI project display message in console windows? 调试C ++ / Cli: <Unknown function> 而且没有当地人 - Debugging C++/Cli: <Unknown function> and no Locals c ++ \\ cli项目相关的c ++ dll未复制到c#输出目录 - c++\cli project dependent c++ dll not copied to c# output directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM