CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    7

    Question how to add reference at run time in C# project

    hi all,


    how can i add an assembly(dll) as reference in a C# project at run time.?! i need to add a reference at run time.!? i.e normally we add references by Right-Clicking References in Solution Explorer and we can browse for any dll and add it in references. i need to do this using code.


    like if i ave a class library(dll) in "C:\Documents and Settings\Pragadheesh\My Documents\Visual Studio 2005\Projects\qwerty\qwerty\bin\Debug\qwerty.dll"

    i need to add this dll as reference to my project. how can i do this at run time.?


    thanks in advance.

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: how to add reference at run time in C# project

    You will need to add use reflection. Take a look at this article
    http://www.codeguru.com/csharp/cshar...icle.php/c5881

Tags for this Thread

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