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.
有没有一种方法可以运行基于。net的应用程序,而不需要安装。net框架。有办法做到这一点吗?有没有软件可以做到这一点?商业软件也是可能的。
Added:
补充道:
Has anyone any experience with VMWare thin client?
有任何VMWare瘦客户端的工作经验吗?
13 个解决方案
#1
27
There are a several different tools out there, a couple I have tried are:
有几种不同的工具,我试过的有:
- XenoCode Postbuild (now Spoon Studio) (now TurboStudio)
- XenoCode Postbuild(现在是Spoon Studio)(现在是TurboStudio)
- Salamander .NET Linker
- 蝾螈。net链接器
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.
我的。net应用程序主要被IT部门使用。安装。net框架对他们来说没什么大不了的。
If you want to write software more targeted at end users then the .NET install may turn them off.
如果您想编写针对最终用户的软件,那么. net安装可能会关闭它们。
#2
16
You can use mono to static-link all the framework dlls you need.
您可以使用mono来静态链接所需的所有框架dll。
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.
更新:根据您的各种评论,我最好的建议是使用框架的2.0版本。这将在windows 2000上很好地安装,没有任何问题,如果需要,您可以从Visual Studio 2008中找到它。
I'm also a little curious as to your windows 2000 requirement. Are you deploying to business or home environments?
我对你们的windows 2000的要求也有点好奇。您是否正在部署业务或家庭环境?
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.
几乎没有家庭用户使用windows 2000。家庭用户最终使用的是Windows ME,它几乎是在同一时间发布的,出于这个原因,它几乎完全转移到了Windows XP上。与windows 2000相比,你更可能在家里看到windows 98机器,甚至连微软都不支持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.
另一方面,很多企业仍然大量使用windows 2000机器。但是,在安装。net框架时,业务环境通常不会有问题。如果有必要,他们甚至可以通过组策略部署将其自动添加到计算机中。
#3
6
Use Mono, it is developed by Novell and is open-source
使用Mono,它是由Novell开发的,是开源的
Edit: Question was about running without an installed runtime regardless of "supplier". Even so, here is a link to Mono's wikipedia entry. Enjoy.
编辑:问题是在没有安装运行时的情况下运行,而不考虑“供应商”。即便如此,这里还是有链接指向Mono的*条目。享受。
http://en.wikipedia.org/wiki/Mono_(software)
http://en.wikipedia.org/wiki/Mono_(软件)
#4
4
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.
我的团队也面临着类似的问题。我们需要在Windows PE下运行。net 3.5 WPF应用,它没有可用的。net框架。我评估了所有选项,发现Xenocode PostBuild是最好的。
It's GUI is a bit counterintuitive and there were some bumps in the road getting it working, but it's been reliable since.
它的GUI有点违反直觉,在实现它的过程中也有一些磕磕碰碰,但是从那以后它就很可靠了。
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).
如果您走那条路,建议您在生成非托管可执行文件之前确保您的代码已经完全调试好,因为您无法调试结果应用程序(除非您喜欢assembler)。
Also note that embedding the .NET framework makes for a big executable. ~20MB for 2.0, and ~40MB for 3.5.
还要注意的是,嵌入。net框架可以实现一个大的可执行文件。2.0 ~20MB, 3.5 ~40MB。
#5
3
You did not mention the type of software that you were looking to run so I figured I would add my two cents.
你没有提到你想要运行的软件的类型,所以我想我应该增加我的2分。
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.
微软已经发布了基于。net的浏览器插件Silverlight,他们一直在与Novell合作,推出基于上面提到的Mono编译器月光的Silverlight版本。微软本地支持Windows和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/
如果你想了解更多信息,这里有一些链接:http://en.wikipedia.org/wiki/Microsoft_Silverlight http://www.microsoft.com/silverlight/
#6
2
This really sounds like more trouble than its worth when you are working with an OS that supports .net.
当你使用支持。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++.
我认为现在的。net 2.0甚至可以作为Windows的更新,只有26mb,而且你只安装一次。如果你想要win32 native的话,那就回到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".)
还可以看看:SmallestDotNet(虽然不是windows 2000,但它提到“不久,微软将为没有. net框架版本的XP SP2机器发布一个超级小的下载”)。
#7
2
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框架,我认为最好考虑使用另一种编程语言,它生成一个独立的可执行文件。像德尔斐或者,如果奖品很重要,拉撒路。但我相信还有其他的选择。
#8
1
The only alternative to .NET framework I know is MONO (for LINUX).
我所知道的。net框架的唯一替代方法是MONO(用于LINUX)。
#9
1
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:
您可以使用IKVM的二进制文件来运行Mono/。没有任何预安装框架的Net/Java应用程序。记住:
You should be able to execute it successfully. (On Windows .NET, remember to copy the IKVM dll's to the current directory.)
您应该能够成功地执行它。(在Windows . net上,记得将IKVM dll拷贝到当前目录。)
Please refer to the documentation to get a better view.
请参阅文档以获得更好的视图。
#10
1
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框架。Mono允许它,也有其他供应商。一种情况是如果您需要在windows pe中运行。
#11
0
If you mean "Can I run a .NET application without having to install a framework at all?" then the answer is no, you cannot.
如果你的意思是“我可以在不需要安装框架的情况下运行。net应用程序吗?”
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.
如果你的意思是“我可以运行。net应用程序而不需要安装微软的。net框架和CLR吗?”那么答案是只有当你能找到另一种选择时,而Mono是我所知道的唯一的选择。
#12
0
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)
你有没有想过用原生代码来编写应用程序?这样你就可以简单地部署你的exe。如果您需要一个RAD环境来提高生产力,那么像Delphi或c++ Builder这样的工具会给您一种非常类似于FCL的感觉(Delphi的VCL在迁移到MS之前由Anders Hejlsberg架构,所以对于Delphites来说,c#并没有什么共同之处是非常熟悉的)
#13
-1
This is one of the better explanations (among the many) I have found:
这是我发现的(众多)更好的解释之一:
As a practical matter, it's not possible. Theoretically, a compiler could examine all the classes your application is using and include that code in your application, and compile the whole thing to native code. But, that still doesn't account for the CLR itself which contains core functionality like the garbage collector, assembly loader, metadata reader, etc. All these things are in native code, so they would have to be duplicated.
实际上,这是不可能的。理论上,编译器可以检查应用程序使用的所有类,并在应用程序中包含该代码,并将整个代码编译为本地代码。但是,这仍然不能解释CLR本身,它包含核心功能,比如垃圾收集器、汇编加载程序、元数据读取器等等。所有这些都是本地代码,所以它们必须被复制。
In addition, not all methods in .NET classes are in managed code. If you look at the disassembled code in Reflector, you'll see that some of the methods are marked with the MethodImplAttributes.InternalCall flag. This means that the actual implementation of the method is internal to the CLR. Any system that compiled C# (or any other .NET language) to native code would have to duplicate all of this, and that would be a herculean effort. And the resulting app would likely be quite large.
此外,并不是。net类中的所有方法都是托管代码。如果你看一下反射器中的拆卸代码,你会发现有些方法是用方法来标记的。InternalCall国旗。这意味着该方法的实际实现是CLR的内部实现。任何将c#(或任何其他。net语言)编译成本机代码的系统都必须复制所有这些,这将是一种巨大的努力。最终的应用可能会非常大。
#1
27
There are a several different tools out there, a couple I have tried are:
有几种不同的工具,我试过的有:
- XenoCode Postbuild (now Spoon Studio) (now TurboStudio)
- XenoCode Postbuild(现在是Spoon Studio)(现在是TurboStudio)
- Salamander .NET Linker
- 蝾螈。net链接器
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.
我的。net应用程序主要被IT部门使用。安装。net框架对他们来说没什么大不了的。
If you want to write software more targeted at end users then the .NET install may turn them off.
如果您想编写针对最终用户的软件,那么. net安装可能会关闭它们。
#2
16
You can use mono to static-link all the framework dlls you need.
您可以使用mono来静态链接所需的所有框架dll。
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.
更新:根据您的各种评论,我最好的建议是使用框架的2.0版本。这将在windows 2000上很好地安装,没有任何问题,如果需要,您可以从Visual Studio 2008中找到它。
I'm also a little curious as to your windows 2000 requirement. Are you deploying to business or home environments?
我对你们的windows 2000的要求也有点好奇。您是否正在部署业务或家庭环境?
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.
几乎没有家庭用户使用windows 2000。家庭用户最终使用的是Windows ME,它几乎是在同一时间发布的,出于这个原因,它几乎完全转移到了Windows XP上。与windows 2000相比,你更可能在家里看到windows 98机器,甚至连微软都不支持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.
另一方面,很多企业仍然大量使用windows 2000机器。但是,在安装。net框架时,业务环境通常不会有问题。如果有必要,他们甚至可以通过组策略部署将其自动添加到计算机中。
#3
6
Use Mono, it is developed by Novell and is open-source
使用Mono,它是由Novell开发的,是开源的
Edit: Question was about running without an installed runtime regardless of "supplier". Even so, here is a link to Mono's wikipedia entry. Enjoy.
编辑:问题是在没有安装运行时的情况下运行,而不考虑“供应商”。即便如此,这里还是有链接指向Mono的*条目。享受。
http://en.wikipedia.org/wiki/Mono_(software)
http://en.wikipedia.org/wiki/Mono_(软件)
#4
4
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.
我的团队也面临着类似的问题。我们需要在Windows PE下运行。net 3.5 WPF应用,它没有可用的。net框架。我评估了所有选项,发现Xenocode PostBuild是最好的。
It's GUI is a bit counterintuitive and there were some bumps in the road getting it working, but it's been reliable since.
它的GUI有点违反直觉,在实现它的过程中也有一些磕磕碰碰,但是从那以后它就很可靠了。
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).
如果您走那条路,建议您在生成非托管可执行文件之前确保您的代码已经完全调试好,因为您无法调试结果应用程序(除非您喜欢assembler)。
Also note that embedding the .NET framework makes for a big executable. ~20MB for 2.0, and ~40MB for 3.5.
还要注意的是,嵌入。net框架可以实现一个大的可执行文件。2.0 ~20MB, 3.5 ~40MB。
#5
3
You did not mention the type of software that you were looking to run so I figured I would add my two cents.
你没有提到你想要运行的软件的类型,所以我想我应该增加我的2分。
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.
微软已经发布了基于。net的浏览器插件Silverlight,他们一直在与Novell合作,推出基于上面提到的Mono编译器月光的Silverlight版本。微软本地支持Windows和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/
如果你想了解更多信息,这里有一些链接:http://en.wikipedia.org/wiki/Microsoft_Silverlight http://www.microsoft.com/silverlight/
#6
2
This really sounds like more trouble than its worth when you are working with an OS that supports .net.
当你使用支持。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++.
我认为现在的。net 2.0甚至可以作为Windows的更新,只有26mb,而且你只安装一次。如果你想要win32 native的话,那就回到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".)
还可以看看:SmallestDotNet(虽然不是windows 2000,但它提到“不久,微软将为没有. net框架版本的XP SP2机器发布一个超级小的下载”)。
#7
2
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框架,我认为最好考虑使用另一种编程语言,它生成一个独立的可执行文件。像德尔斐或者,如果奖品很重要,拉撒路。但我相信还有其他的选择。
#8
1
The only alternative to .NET framework I know is MONO (for LINUX).
我所知道的。net框架的唯一替代方法是MONO(用于LINUX)。
#9
1
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:
您可以使用IKVM的二进制文件来运行Mono/。没有任何预安装框架的Net/Java应用程序。记住:
You should be able to execute it successfully. (On Windows .NET, remember to copy the IKVM dll's to the current directory.)
您应该能够成功地执行它。(在Windows . net上,记得将IKVM dll拷贝到当前目录。)
Please refer to the documentation to get a better view.
请参阅文档以获得更好的视图。
#10
1
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框架。Mono允许它,也有其他供应商。一种情况是如果您需要在windows pe中运行。
#11
0
If you mean "Can I run a .NET application without having to install a framework at all?" then the answer is no, you cannot.
如果你的意思是“我可以在不需要安装框架的情况下运行。net应用程序吗?”
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.
如果你的意思是“我可以运行。net应用程序而不需要安装微软的。net框架和CLR吗?”那么答案是只有当你能找到另一种选择时,而Mono是我所知道的唯一的选择。
#12
0
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)
你有没有想过用原生代码来编写应用程序?这样你就可以简单地部署你的exe。如果您需要一个RAD环境来提高生产力,那么像Delphi或c++ Builder这样的工具会给您一种非常类似于FCL的感觉(Delphi的VCL在迁移到MS之前由Anders Hejlsberg架构,所以对于Delphites来说,c#并没有什么共同之处是非常熟悉的)
#13
-1
This is one of the better explanations (among the many) I have found:
这是我发现的(众多)更好的解释之一:
As a practical matter, it's not possible. Theoretically, a compiler could examine all the classes your application is using and include that code in your application, and compile the whole thing to native code. But, that still doesn't account for the CLR itself which contains core functionality like the garbage collector, assembly loader, metadata reader, etc. All these things are in native code, so they would have to be duplicated.
实际上,这是不可能的。理论上,编译器可以检查应用程序使用的所有类,并在应用程序中包含该代码,并将整个代码编译为本地代码。但是,这仍然不能解释CLR本身,它包含核心功能,比如垃圾收集器、汇编加载程序、元数据读取器等等。所有这些都是本地代码,所以它们必须被复制。
In addition, not all methods in .NET classes are in managed code. If you look at the disassembled code in Reflector, you'll see that some of the methods are marked with the MethodImplAttributes.InternalCall flag. This means that the actual implementation of the method is internal to the CLR. Any system that compiled C# (or any other .NET language) to native code would have to duplicate all of this, and that would be a herculean effort. And the resulting app would likely be quite large.
此外,并不是。net类中的所有方法都是托管代码。如果你看一下反射器中的拆卸代码,你会发现有些方法是用方法来标记的。InternalCall国旗。这意味着该方法的实际实现是CLR的内部实现。任何将c#(或任何其他。net语言)编译成本机代码的系统都必须复制所有这些,这将是一种巨大的努力。最终的应用可能会非常大。