我建于C#.NET 2.0的程序也下框架3.0和3.5的伟大工程。
I built a program in C# .NET 2.0 that works great also under framework 3.0 and 3.5.
但是,如果.NET框架4.0的安装,它不工作的唯一框架,它要求用户安装2.0。
But if .NET Framework 4.0 is the only framework installed, it does not working, it requires the user to install 2.0.
我发现在谷歌以下配置:
i found the following configuration in google:
<startup> <requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/> </startup>添加此到的app.config后,我的程序运行在.NET Framework 4.0中没有任何问题!
After adding this to the app.config, my program works on .NET Framework 4.0 without any problems!
我的搜索是一个.NET任何框架结构,即.NET 2.0下,在.NET 4.0中运行我的程序,如果安装了,否则后果不堪设想。
What i searching for is a .NET 'Any Framework' configuration, that run my program under .NET 2.0 if installed, or else in .NET 4.0.
如何做到这一点?
推荐答案找到了!
下面是配置为所有谁需要它:
Here is the configuration for all who need it:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" /> </startup> </configuration>更多推荐
净“任何框架”的配置
发布评论