Can an application target to both 3.5 and 4.5 .Net version?

妖精的绣舞 提交于 2019-12-04 03:33:01

Build with .NET 3.5 and add these lines to App.config and it worked for me:

<configuration>
  <startup>
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

have your project target 3.5. then add another project to the solution that targets 4.5 and add links to the files from the first project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!