This documentation is archived and is not being maintained.
Compiler Error C2346
Visual Studio 2008
'function' cannot be compiled as native: reason
The compiler was unable to compile a function to MSIL.
To correct this error
Remove the code in the function that cannot be compiled to MSIL.
Either do not compile the module with /clr, or mark the function as unmanaged with the unmanaged pragma.