You are using CLR constructs but you did not specify /clr. Ex:
// compile with: /c __gc class A {}; // C1190 ref class A {};