这个错误只能说VC编译器还不够智能啊
在使用前需要使用Common Language Runtime Support (/clr).
在配置属性中,选择general-》选择clc (Configuration Properties/General/Common Language Runtime support)
解释:This is not C++ but Managed C++ (clr) and thus needs to be specified in project properties at Configuration Properties/General/Common Language Runtime support. There you will see drop down box with options.