我需要将只包含supportedRuntime设置的app.config文件嵌入到我的exe文件中。我尝试使用“嵌入资源”构建操作,但现在它无法读取配置文件中的值,因此无法正常工作。这是我的配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
那么想法是在.Net 4.0上运行我的.Net 2.0 exe。有任何想法吗?
谢谢。