static linking in c# RRS feed

  • Question

  • Hi..

    i want to statically link C# library to C# project...can any help me  

    • Moved by edhickey Tuesday, May 31, 2011 4:35 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Monday, May 30, 2011 6:50 AM


All replies

  • Hi Mvinaymurthy,

    Based on your description, what do you mean of statically link C# library to C# project?

    Do you mean that you have created a C# dll, then you want to link the dll into C# project?

    If so, I think you can perform the following steps:

    1. Right-click the "References" item in your project in Visual Studio
    2. Choose the "Add References" option, then it will show a dialog to add references
    3. Choose the "Browse" tab and select the dll and click OK button. Then the dll will be added into your project.

    Vin Jin [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 1, 2011 6:00 AM
  • Do you mean you got multiple .NET library's and want to combine them as one, like the C++ static linking?

    ILMerge is a tool that can combine multiple .NET assembly's in to one assembly.


    Maybe this is what youre looking for?


    • Proposed as answer by Jesse HouwingMVP Wednesday, June 1, 2011 9:00 AM
    • Marked as answer by Aspen VJ Wednesday, June 8, 2011 1:39 AM
    Wednesday, June 1, 2011 7:29 AM
  • ILMerge works, if you want to go even further, or need mroe advanced linking options, then RemoteSoft Salamander Linker is even better:


    Wednesday, June 1, 2011 9:00 AM