CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2003
    Posts
    52

    How to staticly link a c# application??

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

  2. #2
    Join Date
    Oct 2002
    Location
    Arkansas, USA
    Posts
    189
    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.

  3. #3
    Join Date
    Apr 2003
    Posts
    52
    I did not know that. That sucks. I'll give that a try to see if it fixes the problem.

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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
    - Software Architect

  5. #5
    Join Date
    Apr 2003
    Posts
    52
    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.

  6. #6
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured