Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliSense: "#using" requires C++/CLI to be enabled

Tags:

c++-cli

#using <mscorlib.dll>
#using <System.dll>
using namespace System;
using namespace System::Text;
using namespace System::IO;
using namespace System::Net;
using namespace System::Net::Sockets;
using namespace System::Collections;

Errors: IntelliSense: "#using" requires C++/CLI to be enabled....

how to fix this prob!?

like image 412
Abanoub Avatar asked Feb 11 '11 13:02

Abanoub


People also ask

What does IntelliSense mean?

IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.

How do I enable IntelliSense?

You can enable or disable particular IntelliSense features in the Options dialog box, under Text Editor > C/C++ > Advanced. To configure IntelliSense for single files that aren't part of a project, look for the IntelliSense and browsing for non-project files section.

Why is IntelliSense useful?

Through a number of features including "list members," "parameter information" and "complete work," IntelliSense helps developers evaluate code as they are typing and use fewer keystrokes to implement certain aspects of a code.

Who invented IntelliSense?

IntelliSense is Microsoft's implementation of code completion, best known in Visual Studio.


2 Answers

Your project settings are wrong. Specifically Configuration Properties, General, Common Language Runtime support.

Fall in the pit of success by starting your project by picking one of the project templates in the CLR node.

like image 76
Hans Passant Avatar answered Sep 18 '22 08:09

Hans Passant


Choose Project -> Properties from the menu bar. In the Project properties window, under Configuration Properties -> General, make sure that Common Language Runtime Support is set to Common Language Runtime Support (/clr)

In VS2019 it the steps would be :

  • 1/ Right click on the project

  • 2/ Project

  • 3/ Properties

  • 4/ Configuration Properties

  • 5/ Advanced

  • 6/ Common Language Runtime Support change it to Common Language Runtime Support(/clr)

like image 38
zangw Avatar answered Sep 18 '22 08:09

zangw