解决方案,修改app.config配置文件的startup节点,修改内容如下:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<requiredRuntime version="v4.0.20506" />
</startup>
</configuration>