'mscorlib.dll' can only be imported at global scope
The instruction to import mscorlib.dll into a program that uses Managed Extensions for C++ cannot appear in a namespace or function, but must appear at global scope.
The following sample generates C1191:
// uncomment the following line to resolve // #using <mscorlib.dll> namespace sample { #using <mscorlib.dll> // C1191, not at global scope } void main() { }