No IntelliSense for C++/CLI in Visual Studio 2010?

2019-01-04 02:32发布

I just moved from Visual Studio 2008 to Visual Studio 2010 (final) and noticed one major flaw:

When I try to use AutoComplete in a C++ source file for managed C++, a small note in the footer appears:

IntelliSense for C++/CLI is not available

Uh, has IntelliSense for C++/CLI been dropped from Visual Studio 2010? Is there any way to get this back? It is rather useful...

7条回答
女痞
2楼-- · 2019-01-04 03:19

Yes! you can enable the IntelliSence, but in a tricky way. Follow these instructions:

  1. Go to your project properties. (Right click on your project name in Project Explorer, and select Properties. or simply Alt + Enter)
  2. From Configuration Properties, select General
  3. In the right-hand section, find "Common Language Runtime Support" and change it to "No Common Language Runtime Support".
  4. Click the OK Button.

Now the IntelliSence is working. But a problem is an error when you compile your code! (The error is: error LNK1123: failure during conversion to COFF: file invalid or corrupt)

You can simply go back to Project Properties an change Common Language Runtime Support to "Common Language Runtime Support, Old Syntax (/clr:oldSyntax)".

Good luck.

查看更多
登录 后发表回答