净“任何框架”的配置

编程入门 行业动态 更新时间:2024-10-26 00:23:23
本文介绍了净“任何框架”的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我建于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>

更多推荐

净“任何框架”的配置

本文发布于:2023-05-25 10:42:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/226464.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!