Home All Groups Group Topic Archive Search About
Author
14 Dec 2006 1:34 AM
ashesman
OK, I have written an application in MS Visual C# using .net.  Is it
posibble to static link into one self contained .exe file?  This would
certainly make distribution of a small accessory file much easier.  And
allow it to be easily packaged and installed with our other applications
built in an old C++ builder.  If static linking is possible, how to do
it in Visual Studio?



--
ashesman
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Author
14 Dec 2006 7:38 AM
Jon Skeet [C# MVP]
ashesman <ashesman.2is***@mail.codecomments.com> wrote:
> OK, I have written an application in MS Visual C# using .net.  Is it
> posibble to static link into one self contained .exe file?  This would
> certainly make distribution of a small accessory file much easier.  And
> allow it to be easily packaged and installed with our other applications
> built in an old C++ builder.  If static linking is possible, how to do
> it in Visual Studio?

You can merge multiple assemblies together with ILMerge, but you'd
still need the .NET framework to be installed. There are a few ways
round that, although none are very widely used as far as I'm aware:
http://www.pobox.com/~skeet/csharp/faq/#framework.required

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Are all your drivers up to date? click for free checkup

Author
14 Dec 2006 7:38 PM
Chris Mullins
"ashesman" <ashesman.2is***@mail.codecomments.com> wrote
>
> OK, I have written an application in MS Visual C# using .net.  Is it
> posibble to static link into one self contained .exe file?  This would
> certainly make distribution of a small accessory file much easier.  And
> allow it to be easily packaged and installed with our other applications
> built in an old C++ builder.  If static linking is possible, how to do
> it in Visual Studio?
>

It depends on what you mean by static linking. If by this you mean, "Run on
a system that doesn't have .Net installed", you can use the remotesoft stuff
to do it:
http://www.remotesoft.com/

We deploy our install applications this way, so that the installer will
"just run" on a machine, regardless of pretty much anything else.

We've also deployed some .NET WinForms applications this way. The client
said, "You can't use .Net 2.0. We're not installing that on our 10,000 old
Win98 machines." to which we responded, "here's the client.exe, it should
run just fine.".

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins



Post Thread options