The State of Linkers for .Net Apps (Aka "Please Sir, May I Have a Linker" 2009 Edition)

The State of Linkers for .NET apps (aka Please Sir, May I have a Linker 2009 edition)

The case of the Mono Linker.

I can't talk much about the other pieces of software that are listed here, but as the author of the Mono Linker, I can tell what it does and what it does not.

The Mono Linker is only a managed linker, so by definition, it takes assemblies, and removes what's not necessary for a program to run. It doesn't merge assemblies all together, and it doesn't make a native program out of them.

There's a Mono.Merge clone of ILMerge, but it's not complete, and its author is not maintaining it. To generate a native program containing both the Mono runtime and assemblies, Mono provides the mkbundle tool.

Also, as it is only a managed tool, which is altering assemblies, if you give it strong named assemblies, and that you don't have the private keys to sign them back, you'll have troubles running those assemblies.

I wrote a couple of blog posts about the linker:

  • A presentation of the linker
  • A combined used of the linker and mkbundle

About our experience with the Linker. The Linker is currently used in two parts of the Mono project. It's used to generate the assembly that we distribute for people to embed our C# compiler, Mono.CSharp.dll. You can watch Miguel's presentation at the PDC, which describes how we do that. It's pretty straightforward, and it's a basic usage of the Linker, which is a customizable tool, and it's pretty easy to write custom steps for it.

A more complex use of the Linker is the way we create our Moonlight assemblies. Moonlight being our implementation of Silverlight, the assemblies are a subset of the desktop assemblies. So we link our desktop assemblies to reduce their sizes, and using custom steps, we're transforming the public API to match Silverlight's.

So yeah, the Linker has some pretty rough edges, such as the command line interface for instance, or the fact that you have to really know what you're doing, or you may end up with some weird assemblies, but all in all, it works really well for us.

How to release .Net apps without bundling .Net framework?

One option without using Ngen may be to release using the .Net Framework 3.5 SP1 "Client Profile". This is a sub-set of the .Net Framework used for building client applications which can be downloaded as a separate, much smaller, package.

See details from the BCL Team Blog here and Scott Guthrie here.

Mono mkbundle tool unable to create binary with complaint that output file is unavailable

It seems like it's trying to output into MyProject.exe, which is the same as the input file.

Try running

$ mkbundle -o ProgramOutput Program.exe --deps

This is just a guess, by the way, since I don't know mkbundle.

Run a non GUI .net Framework application without .net installed

No, the .Net framework is a requirement for running .net applications.
The .net framework provides the host that runs the .Net code. It's in many ways similar to Java and its virtual machine.

Commercial 'Help' creation tools available for .NET applications?

I use Help & Manual which is extremely capable. It provides multiple outputs - chm, pdf, hlp and others. It is easy to use; can take very large help sources; and supports multiple languages and external translators; and can be used to generate application help (tool tips, etc.) I have no connection with the product or company, except as a very satisfied user. I do believe that its capabilities far outstrip Microsoft's free tool, though it is some years since I used the MS tool.



Related Topics



Leave a reply



Submit