visual c++ - "#using" requires C++/CLI mode -


my code starts off this:

#include "stdafx.h" #include <string> #using <mscorlib.dll> #using <system.data.dll> #using <system.dll>  using namespace system; using namespace system::data::oledb; 

but ends compile error "#using" requires c++/cli mode

i had problem , managed solve through following post intellisense: "#using" requires c++/cli enabled. updated vs2017 ver 15.3.0 yesterday , broken again. project properties follows:

enter image description here

any assistance appreciated. p.

you can control setting within code putting in files

#pragma managed 

first search code sure #pragma isn't being used turn off managed building somewhere earlier (in #include file, perhaps?). try putting in file>

i'm not sure if solve problem should @ least eliminate worry file not being build properly. , perhaps error message might change give better idea problem is

https://msdn.microsoft.com/en-us/library/0adb9zxe.aspx?f=255&mspperror=-2147217396

c++ cli correct way use #pragma managed / unmanaged


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -