467,878 Members | 1,259 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,878 developers. It's quick & easy.

Static Linking C# .net


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
------------------------------------------------------------------------

Dec 14 '06 #1
  • viewed: 10352
Share:
2 Replies
ashesman <as*************@mail.codecomments.comwrote:
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/f...ework.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
Dec 14 '06 #2
"ashesman" <as*************@mail.codecomments.comwrote
>
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

Dec 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dibyendu Roy | last post: by
6 posts views Thread by Andrew S. Giles | last post: by
8 posts views Thread by Robert A Riedel | last post: by
reply views Thread by zhangrusi | last post: by
1 post views Thread by wenqiang.zhou | last post: by
4 posts views Thread by aaragon | last post: by
reply views Thread by jack112 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.