Click to See Complete Forum and Search --> : How to staticly link a c# application??
Avenger001
April 9th, 2003, 04:39 PM
I'm used to programing in mfc, so I might be asking a simple/stupid question.
I tried to run my application on another computer, and of course it didn't work because of missing dll files. Normaly I would just recompile with staticly linked dll files, and that would work.
But I cant' find this option for a c# application. What's up with that?? Is there a new way of doing this? Or do I have to bite the bullet and copy all necessary dll files with the application, register them and so on..
gjs368
April 9th, 2003, 04:51 PM
You may or may not already know this, but the .NET framework must be installed on the target computer before it will run your code.
Avenger001
April 9th, 2003, 08:03 PM
I did not know that. That sucks. I'll give that a try to see if it fixes the problem.
pareshgh
April 10th, 2003, 12:53 PM
I would suggest that,
when you use dlls with c# you can dynamically link dlls instead of static stuffs.
that not only will reduce the size of the file but if external files dependencies are changed due to OS you will know that.
Paresh
Avenger001
April 10th, 2003, 01:06 PM
The reason I wanted to staticly link the dll's is because there are some people who won't be able to install any extra's like dll's or the .net framework on there pc's.
Also, the dll's I was refering to are just the basic dll required to fun the application. I'm not making my own or importing any specialized dll's.
But if they absolutly need to have the .net framework to even run the application like the previous message stated, then none of this matter. No matter what, they'll need to install the framework and this will probably install all those missing dll's that are required to run the application.
I guess until the newer version of windows come out, probably with the framework already installed...it's going to be a bit of a pain have to ask people to install the framework in order for my apps to work on there computer.
pareshgh
April 10th, 2003, 04:13 PM
1) .NET applications needs CLR/FCL to be installed to run Assemblies and PE files
2) if you are using general files of windows system then you may not even install coz its already there unless it is a seperate dll.
-Paresh
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.