473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
2 12544
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
6
by: Andrew S. Giles | last post by:
Is it possible to bring in a static library (developed in C++) into a C# project/solution? Thanks in advance for any information. Andrew S. GIles
8
by: Robert A Riedel | last post by:
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with...
0
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this...
1
by: wenqiang.zhou | last post by:
i only kown that static members doesnt blong to any object and it have to initialize outside class, inline is near the same as define it will replace in code.but i was puzze by the following codes....
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
4
by: nishantb | last post by:
I had posted simillar question some time back. i want to link some libraries statically on NT. currently, product execute command simillar to following. link /STACK:0x20000 /libpath:D:/lib...
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
4
by: aaragon | last post by:
Hi everyone, I have a linking error when using gcc4.2 and static member variables. The class template definition is something around the following: template<> class Element<L2_t: public...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.