在没有 .NET Framework 的情况下运行基于 .net 的应用程序
有没有一种方法可以在不安装 .net 框架的情况下运行基于 .net 的应用程序。 有没有办法做到这一点。 有没有一个软件可以实现这个功能。 商业软件也是可能的。
添加:
有人使用过 VMWare 瘦客户端吗?
Is there a way to run .net based applications without .net framework installed. Is there a way to do this. Is there a software that can achive this. Commercial software is also possible.
Added:
Has anyone any experience with VMWare thin client?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
有几种不同的工具,我尝试过的几个是:
您可以通过搜索“找到更多信息” .NET 链接器。"
我尝试过的上述两个似乎工作正常,但我从未广泛测试过用它们构建的代码。 我尝试它们主要是出于好奇。
我的 .NET 应用程序主要由 IT 部门使用。 安装.NET框架对他们来说并不是什么大事。
如果您想编写更针对最终用户的软件,那么 .NET 安装可能会关闭它们。
There are a several different tools out there, a couple I have tried are:
You can find more by doing a search for ".NET Linker."
The two above, which I tried, seemed to work ok, but I never widely tested my code built with them. I tried them mostly out of curiosity.
My .NET apps are mostly used by IT departments. Installing the .NET framework is no big deal for them.
If you want to write software more targeted at end users then the .NET install may turn them off.
您可以使用 mono 静态链接您需要的所有框架 dll。
当然,这限制了您只能使用该框架的单声道实现,该实现正在变得更好,但在某些地方仍然不完整。
更新:
根据您的各种意见,我最好的建议是使用该框架的 2.0 版本。 它可以在 Windows 2000 上正常安装,没有任何问题,并且如果需要,您可以从 Visual Studio 2008 定位它。
我也对你的 windows 2000 要求有点好奇。 您要部署到企业还是家庭环境中?
几乎没有家庭用户拥有 Windows 2000。家庭用户最终选择了(不寒而栗)Windows ME,它大约在同一时间发布,因此几乎完全转向 Windows XP。 与 Windows 2000 相比,您更有可能在家里看到 Windows 98 机器,甚至 Microsoft 仍然不支持 Windows 98。
另一方面,大量企业仍然大量使用 Windows 2000 机器。 但商业环境中安装 .Net 框架通常不会出现问题。 如果需要,他们甚至可以通过组策略部署自动将其添加到计算机中。
You can use mono to static-link all the framework dlls you need.
Of course, that limits you to the mono implementation of the framework, which is getting better but is still incomplete in a few places.
Update:
Based on your various comments, my best suggestion is to use version 2.0 of the framework. That will install just fine on windows 2000 with no trouble, and you can target it from Visual Studio 2008 if you need to.
I'm also a little curious as to your windows 2000 requirement. Are you deploying to business or home environments?
Almost no home users have windows 2000. Home users ended up with (shudder)Windows ME instead, which was released about the same time, and for that reason have almost completely moved on to Windows XP. You're more likely to see as windows 98 machine in a home than windows 2000, and not even Microsoft still supports windows 98.
On the other hand, an awful lot of businesses still use windows 2000 machines in large numbers. But business environments don't usually have a problem installing the .Net framework. They can even add it to machines automatically via group policy deployment if they have to.
使用 Mono,它由 Novell 开发,并且是开源的编辑:问题是关于在没有安装运行时的情况下运行,无论“供应商”如何。 即便如此,这里还是 Mono 维基百科条目的链接。 享受。
http://en.wikipedia.org/wiki/Mono_(软件)
Use Mono, it is developed by Novell and is open-sourceEdit: Question was about running without an installed runtime regardless of "supplier". Even so, here is a link to Mono's wikipedia entry. Enjoy.
http://en.wikipedia.org/wiki/Mono_(software)
我的团队也面临着类似的问题。 我们需要在 Windows PE 下运行 .NET 3.5 WPF 应用程序,而 Windows PE 没有可用的 .NET 框架。 我评估了所有选项,发现 Xenocode PostBuild 是最好的。
它的 GUI 有点违反直觉,在让它工作的过程中遇到了一些坎坷,但从那以后它就一直很可靠。
如果您走这条路,请注意,您需要确保在生成非托管可执行文件之前完全调试代码,因为您无法调试生成的应用程序(除非您喜欢汇编程序)。
另请注意,嵌入 .NET 框架会产生很大的可执行文件。 2.0 约为 20MB,3.5 约为 40MB。
My team faced a similar problem. We needed to run our .NET 3.5 WPF app under Windows PE, which has no usable .NET framework. I evaluated all the options and found Xenocode PostBuild to be the best.
It's GUI is a bit counterintuitive and there were some bumps in the road getting it working, but it's been reliable since.
If you go that route, be advised you need to make sure your code is fully debugged before you generate the unmanaged executable, as you cannot debug the resulting app (unless you like assembler).
Also note that embedding the .NET framework makes for a big executable. ~20MB for 2.0, and ~40MB for 3.5.
您没有提到您想要运行的软件类型,所以我想我会加两分钱。
微软已经发布了Silverlight,一个基于.NET的浏览器插件,并且他们一直在与Novell合作推出基于上面提到的Mono编译器的Silverlight版本,称为Moonlight。 Microsoft 原生支持 Windows 和 Mac OS X 10.5。
如果您想了解更多信息,这里有一些链接:
http://en.wikipedia.org/wiki/Microsoft_Silverlight
http://www.microsoft.com/silverlight/
You did not mention the type of software that you were looking to run so I figured I would add my two cents.
Microsoft has released Silverlight, a .NET based browser plugin, and they have been working with Novell to put out a version of Silverlight based upon the Mono compiler mentioned above called Moonlight. Microsoft natively supports Windows and Mac OS X 10.5.
If you want more information here are some links:
http://en.wikipedia.org/wiki/Microsoft_Silverlight
http://www.microsoft.com/silverlight/
如果不想使用 .NET 框架,我认为最好考虑使用其他编程语言,它会生成独立的可执行文件。 像德尔福(Delphi)之类的东西,或者,如果奖项很重要的话,拉撒路(Lazarus)。 但我确信还有其他选择。
If one does not want to use the .NET framework, I think it would be better to consider using an other programming language, which generates a stand-alone executable. Something like Delphi or, if the prize is important, Lazarus. But I'm sure there are other alternatives.
当您使用支持 .net 的操作系统时,这听起来确实是麻烦多于其价值。
我认为.net 2.0 如今甚至可以作为 Windows 更新来使用,它只有 26mb,而且只需安装一次。 如果您想要 win32 本机的东西,请返回非托管 C++。
另请查看:SmallestDotNet(虽然不是 Windows 2000,但它提到“很快,Microsoft 将发布一个适用于没有 .NET Framework 版本的 XP SP2 计算机的超小下载”。)
This really sounds like more trouble than its worth when you are working with an OS that supports .net.
.net 2.0 I think even comes down as a Windows Update these days, its only 26mb, and you only install it once. If you want something thats win32 native go back to unmanaged C++.
Also check out: SmallestDotNet (although not windows 2000, it mentions that "Soon, Microsoft will release a super-small download for XP SP2 machines that have no version of the .NET Framework".)
我所知道的 .NET 框架的唯一替代方案是 MONO(针对 LINUX)。
The only alternative to .NET framework I know is MONO (for LINUX).
为了完整起见,也为了与 MONO 的回复一起考虑一些事情。
您是否考虑过用本机代码编写应用程序? 这样你就可以简单地部署你的exe。 如果您需要 RAD 环境来提高生产力,那么像 Delphi 或 C++ Builder 这样的工具会给您一种非常类似 FCL 的感觉(Delphi 的 VCL 是由 Anders Hejlsberg 在转到 MS 之前设计的,所以 C# 感觉非常熟悉可能并非巧合。德尔菲特)
In the interests of completeness and something to consider along with the responses re MONO.
Have you thought about maybe writing the app in native code instead? That way you can simply just deploy your exe. If you need a RAD environment for productivity, then tools like Delphi or C++ Builder will give you a very FCL like feel (Delphi's VCL was architected by Anders Hejlsberg before he moved to MS, so probably no co-incidence that C# feels very familiar to Delphites)
老问题,但它可以帮助其他读者
您可以使用 IKVM 的二进制文件来运行 Mono/.Net/Java 应用程序,而无需任何预安装的框架。
只要记住:
请参阅 文档以获得更好的视野。
Old question but it can help other readers
You can use IKVM's binaries to run a Mono/.Net/Java application without any pre-installed framework.
Just keep in your mind:
Please refer to the documentation to get a better view.
这称为静态链接 .net 框架。 Mono 允许这样做,而且还有其他供应商。 一种情况是如果您需要在 windows pe 中运行。
It's called statically linking the .net framework. Mono allows it and there are other vendors too. One case is if you need to run in windows pe.
如果您的意思是“我可以运行 .NET 应用程序而无需安装框架吗?” 那么答案是否定的,你不能。
如果您的意思是“我可以在不安装 Microsoft 的 .NET 框架和 CLR 的情况下运行 .NET 应用程序吗?” 那么答案就是你能找到替代方案,而 Mono 是我所知道的唯一一个。
If you mean "Can I run a .NET application without having to install a framework at all?" then the answer is no, you cannot.
If you mean "Can I run a .NET application without having to install Microsoft's .NET framework and CLR?" then the answer is only if you can find an alternative, and Mono is the only one I know of.
这是我发现的更好的解释之一(在众多解释中):
This is one of the better explanations (among the many) I have found: