Managed code compiles to Intermediate Language that will run on the Common Language Runtime (CLR). Unmanaged code compiles to machine code that runs directly on the computer.
When you try to include any managed code in the unmanaged code and compile you will get this error message.
To eliminate this error you should use the common runtime support for your code.
To enable the /clr option for your project in Visual Studio go to:
Project --> Properties-->Configuration Properties-->General-->Common Language Runtime Support.
and select the "Common Language Runtime Support (/clr)". Now save and compile.
.
No comments:
Post a Comment