Turning .NET executable into native executable

前端 未结 11 2129
既然无缘
既然无缘 2020-12-03 00:19

Is there any approach to convert an application developed in .NET into a native executable (sources are included)?

Installing the whole framework (up to .NET Framew

相关标签:
11条回答
  • 2020-12-03 00:29

    ThinApp (formerly Thinstall) from vmware. Used to be very expensive, though.

    http://www.vmware.com/products/thinapp/

    0 讨论(0)
  • 2020-12-03 00:30

    With .net 3.5 SP1 it is possible to install a smaller subset of the .net framework. Take a look at this screenshot:
    (source: windowsclient.net)

    0 讨论(0)
  • 2020-12-03 00:32

    You will only need to install the version of .NET that you are targeting e.g. .NET1.1 or .NET2.0

    Edit: If you need to target the 3.5 version you will need to install both 2.0 and 3.5

    ILMerge (Free) can combine several assemblies into one, but I don't think that it works with the core runtimes.

    In short I think that if you want to run .NET programs you will need the .NET Framework installed.

    0 讨论(0)
  • 2020-12-03 00:34

    No, NGen'd code still needs the framework - it only pre-JITs the code in your own assemblies. It also requires the framework for the CLR itself.

    I believe Mono has a static compiler which they're planning on using for the iPhone. I don't know whether that will work on Windows as well though.

    There used to be a product called Thinstall which some people used for this. It's now called ThinApp - basically it's application virtualisation. It's commercial, but you may well be able to get hold of a trial version.

    Personally I'd be somewhat concerned about any such product - when it comes to deployment, veering away from the mainstream way of doing things sounds like a recipe for lots of support calls. There's just an awful lot to go wrong. I'm not saying it doesn't work, just that I'd be wary.

    Have you looked at the .NET 3.5 (SP1) Client Profile? That may help to reduce your installation requirements a little.

    0 讨论(0)
  • 2020-12-03 00:40

    Some Obfuscators do this, you would have to do it beforehand though (before you ship it to your users). An example is remotesoft's Salamander.

    0 讨论(0)
  • 2020-12-03 00:41

    It's not available yet, but the Mono project team are working on an Ahead of Time compiler that will do what you are looking for. The intention is for Mono to work on the iPhone (like Unity) but it should work for all platforms.

    Edit: It does support Mono x86, but I'm not sure if they have included the feature that packs in dependent classes yet (though from an interview I heard, it's planned)

    Edit 2: Including dependencies is currently supported, thanks Dykam!

    0 讨论(0)
提交回复
热议问题