带有单个 .exe 的 .Net,无需安装 .NET Framework

发布于 2024-08-19 21:55:47 字数 471 浏览 2 评论 0原文

我用 C# 编写了简单的桌面程序。我不愿意在互联网上分发它,因为我不确定用户是否会经历安装 .Net Framework 的痛苦。 我的目标用户是不懂技术的用户。

我对MFC很熟悉,大概一个月就能用MFC写出这个程序。 MFC 很好,因为我不必担心分发其他组件。这将是一个很好的单一可执行文件。

所以我真正的问题是:是否可以编写 .Net 应用程序而不必担心分发 .Net Framework?

更新 我找到了另一个解决方案:如果您使用Innosetup,有一个安装.net框架的脚本。 http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx

I wrote my simple desktop program in C#. I am reluctant to distribute it on the internet because i am not sure if users will go through pain of installing the .Net Framework.
My target users are non-tech savvy users.

I am very familiar with MFC and I probably can write this program in MFC in a month. MFC is nice because I don't have to worry about distributing other components. It will be one nice single executable.

So my real question is this: Is it possible to write .Net app without worrying about distributing .Net Framework?

Update
I found another solution: If you are using Innosetup, there is a script that installs .net framework.
http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx

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

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

发布评论

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

评论(4

勿挽旧人 2024-08-26 21:55:47

如果您使用Windows Installer,它可以自动安装所需版本的.NET Framework。此外,Jay 的说法是正确的,.NET Framework 3.0 安装在 Windows Vista 上,3.5 版包含在 Windows 7 中。

If you use Windows Installer, it can automatically install the required version of the .NET Framework. Also, Jay is correct that the .NET Framework 3.0 is installed on Windows Vista and version 3.5 is included with Windows 7.

薔薇婲 2024-08-26 21:55:47

您可以通过应用程序虚拟化来做到这一点。有一个视频专门演示了如何使用 Thinstall 来避免分发/安装 .net Framework 2.0:http://thinstall .com/demos/dnet20/

自从它被 VMware 收购以来我就没有使用过它,但这肯定不会对产品产生负面影响。新产品页面:http://www.vmware.com/products/thinapp/

好的一点是,一旦您对程序进行了 Thinapp/Thinstall,客户就不会知道他们正在运行任何异常情况。它看起来仍然像一个单独的 EXE,但包含可以在后台悄悄加载的任何所需依赖项。

You can do it with application virtualisation. There's a video that demonstrates using Thinstall specifically to avoid needing to distribute/install .net Framework 2.0: http://thinstall.com/demos/dnet20/

I haven't used it since it was bought by VMware but surely that wouldn't have a negative impact on the product. New product page: http://www.vmware.com/products/thinapp/

The good thing is once you've Thinapp/Thinstall'ed your program, the customer has no idea that they're running anything out of the ordinary. It still looks like a single EXE but contains any required dependencies which can quietly load in the background.

薄荷→糖丶微凉 2024-08-26 21:55:47

否。

您的应用程序是否针对不太可能已安装至少 2.0 版本的用户?

No.

Is your app targeting users who are not likely to already have at least 2.0 installed?

情话墙 2024-08-26 21:55:47

根据您使用的框架的版本,您很可能不会疏远太多人。

http://www.hanselman.com/blog/HowManyPCsInTheWorldHaveTheNETFrameworkInstalled.aspx

Depending on the version of the framework you're using, you're most likely not alienating too many people.

http://www.hanselman.com/blog/HowManyPCsInTheWorldHaveTheNETFrameworkInstalled.aspx

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