'function' cannot be compiled using /com+: 'text'; compile without /com+
There are restrictions when using inline assembly with Managed Extensions for C++. For example, static functions cannot contain inline assembly. The following sample generates C2349:
#using <mscorlib.dll> // remove static, the asm, or compile without /com+ to resolve static void TestInlineAsmInStaticFunc(void) { // C2349 __asm { nop } } void main() { TestInlineAsmInStaticFunc(); }