Running .net based application without .NET Framew

2019-01-01 09:14发布

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?

13条回答
ら面具成の殇う
2楼-- · 2019-01-01 09:20

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.

查看更多
爱死公子算了
3楼-- · 2019-01-01 09:26

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.

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.

查看更多
看淡一切
4楼-- · 2019-01-01 09:28

Use Mono, it is developed by Novell and is open-source

Edit: 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)

查看更多
像晚风撩人
5楼-- · 2019-01-01 09:29

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".)

查看更多
公子世无双
6楼-- · 2019-01-01 09:30

The only alternative to .NET framework I know is MONO (for LINUX).

查看更多
呛了眼睛熬了心
7楼-- · 2019-01-01 09:31

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.

查看更多
登录 后发表回答