.NET Framework 1.x 应用程序只能在装有 .NET 4.0 的 PC 上运行吗?

发布于 2024-09-25 21:02:32 字数 644 浏览 0 评论 0原文

基本上,我试图确定为 1.x 制作的应用程序是否可以在仅安装了一份 .NET 框架副本的计算机上运行,​​该版本比我的目标版本更高,即:它只有一份 .NET 框架副本。 NET 2.0、3.0、3.5 或 4.0 - 有其中任何一个的副本,仅此而已,假设的计算机不会安装 1.0 或 1.1。

尝试确定 1.0 或 1.1 应用程序是否会在这里运行 - 该应用程序是一个简单的应用程序,我只是想在不需要安装框架的情况下获得最大的覆盖范围(是的,我意识到框架现在真的很小,大约是40mb,但这对我来说仍然不是一个选择)。谢谢

旁白:顺便说一句,我在谷歌上搜索了这个没有结果,我们是否有或有人知道运行(例如)2.0、1.x、3.5 等的 Windows 计算机百分比的采用统计数据...或 2.0 及以上版本,或 1.x 及以上版本? scott hanselmans 博客上有一个参考资料,但这对我来说似乎非常乐观且不正确,因为我对普通用户进行了一些用户字符串分析,2.0+ 的采用率仅略高于 50%,而 hanselmen 表示根据 Windows 更新数据,该比例为 95 %(这是 2010 年 1 月的情况)。

编辑\更新 有人可以确认 Nayan 的答案(以及 Daniels 在 Darins 答案下的观点)是否正确吗?如果是这样,这将改变一切!

Basically, i am trying to determin if an application made for 1.x will run on a computer with just one copy of the .NET framework installed which is a higher version than what i am targetting, ie: it only has one copy of .NET 2.0, or 3.0, or 3.5 or 4.0 - has one copy of either of these and thats it, the hypothetical computer would not have 1.0 or 1.1 installed.

Trying to determine if 1.0 or 1.1 app would run here - the app is a simple app and im just trying to get the largest reach possible without the need to install the framework (and yes, i realize the frameworks are really small now days at about 40mb, but this is still not an option for me). thanks

an aside: btw, i have googled this to no avail, do we have or does anyone know adoption stats in terms of % of windows computers that run (say) 2.0, 1.x, 3.5 etc... or 2.0 and above, or 1.x and above? there is a reference on scott hanselmans blog but this seems really optimistic and incorrect to me as i did some user-string analysis of common users, and adoption of 2.0+ was barely above 50% while hanselmen said according to windows update data it was 95% (and this was in janruary 2010).

Edit\Update Could someone please confirm if Nayan's answer (and Daniels point under Darins answer) is correct? If so, this would change everything!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

内心激荡 2024-10-02 21:02:32

是的,如果您安装了更高版本的框架,它会正常运行。它是向后兼容的。但到了 2010 年底,仍然保留针对 .NET 1.* 的应用程序已经没有什么意义了。如果不是 .NET 3.5 或 4.0,您至少可以重新编译它们以针对 .NET 2.0。

Yes it will run fine if you have a higher version of the framework installed. It is backwards compatible. But in the end of 2010 there's very little sense in still keeping applications targeting .NET 1.*. You could at least recompile them to target the .NET 2.0 if not .NET 3.5 or 4.0.

沫雨熙 2024-10-02 21:02:32

要回答您的问题,wikipedia 页面显示了哪些版本的 Windows 具有哪些版本的 .net默认预安装

回答您的主要问题。我 100% 知道,如果你有 3.5,那么只要安装了 3.5,它就能运行 1.0-3.5。不过我不知道4是否也是如此。

To answer your aside the wikipedia page shows what versions of windows have what version of .net pre-installed by default

To answer your main question. I know 100% that if you have 3.5 it will run 1.0-3.5 with just that installed. However I do not know if that is true for 4.

柏林苍穹下 2024-10-02 21:02:32

在 .net 1+ frmaeworks 上运行应用程序应该不会有任何问题。

You should not have any problems running your application on .net 1+ frmaeworks.

帅气称霸 2024-10-02 21:02:32

。 Net 被设计为始终向后兼容。这意味着如果我们使用更高版本,它仍然可以工作。

这也意味着,如果微软团队犯了一个错误,它仍然会存在,只是会有更好的方法可用

. Net has been designed to always be backwards compatible. This means if we get to later versions it will still work.

It also means if the Microsoft team make a mistake it will still be there just a better way will be available

孤星 2024-10-02 21:02:32

我认为这个问题不是很清楚。我将解释:

  1. 如果您询问应用程序是否已经基于 .NET 1.x 构建,并且您尝试在任何其他版本中运行它,它将无法工作。它需要相同的版本。

  2. 但是如果您仍然拥有代码并且愿意在较新的 .NET 版本上重新编译它,那么您将拥有一个较新的 .NET 版本兼容的应用程序!

我觉得您的问题中缺少的是您是在谈论构建的应用程序还是源代码。

I don't think the question is very clear. I'll explain:

  1. If you are asking if the application is already built on .NET 1.x and you are trying to run it in any other version, it will not work. It would need the same version.

  2. But if you still have the code and are willing to recompile it on newer .NET versions, then you will have a newer .NET version compatible app!

What, I feel, missing in your question is that whether you are talking about built up apps or source codes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文