Error Message

A virtual function with __clrcall calling convention in a native type causes the creation of a per application domain vtable. Such a variable may not correct correctly when used in multiple application domains.

You can resolve this warning by compiling with /clr:pure, which makes global variables per appdomain by default, or by explicitly marking the variable __declspec(appdomain).