472,950 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,950 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 12409
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

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.