Possible Duplicate:
No IntelliSense for c++/cli in visual studio 2010?
As the title already states, nothing gets popped up or s开发者_开发技巧yntax checked. In the status bar, the following message is displayed.
Intellisense 'Unavailable for C++/CLI'
Usually I am using native C++ in Visual C++ 2010 Express.
In Visual C++ 2008, Intellisense was working correctly for C++/CLI, so I guess it should be working in this version too.
The IntelliSense parser in the C++ IDE was due for an overhaul, it had chronic problems that didn't get better with each release. Random corruption of the .ncb file, the IS database was rampant. For VS2010, it was completely rewritten, a new parser and a new way to store the results. Now an .sdf file, a SQL Compact database. The parser was written by the Edison Design Group, they are famous for being the only ones that ever wrote a C++ parser that completely implements the standard.
Sadly, they didn't have the resources to give C++/CLI the same treatment. The work is deferred, it definitely won't make it for SP1. The connect feedback report is here, only 24 votes. Cast your vote.
EDIT: this was taken care of in VS2012, it again supports IntelliSense for C++/CLI. And C++/CX, a language extension to support WinRT that has a syntax that is very similar to C++/CLI, the likely inspiration to get this work done.
From http://connect.microsoft.com/VisualStudio/feedback/details/459187/intellisense-unavailable-for-c-cli :
Hi,
As the team that invented C++/CLI, we are firm believers that it's one of the best ways to interact with managed code (whether it's to expose native objects or consume managed ones).
I want to make it clear that while we can't address this issue, we reduced support for C++/CLI only due to time and resource constraints. This is NOT an indication that we are distancing ourselves from the technology. You can still see managed classes in Class View, search for symbols, get definitions/declarations and the Winforms designer and Unit Testing functionality continue to work.
Unfortunately, it would have taken a long time to add full support for C++/CLI semantics to our new Intellisense parser and we wanted to get this into the hands of native developers in the meantime. We are sorry we couldn't do it all in one release and we eventually intend to bring this support into the Intellisense engine.
Thanks,
Boris Jabes
Visual C++ Team
精彩评论