Click here to Skip to main content
13,197,527 members (31,818 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to load dll dynamically .But without adding the reference of the dll ,to avoid my C# application to load the dll from a particular place only.

Because due to following reason -
- i'm installing a software & it generates some dlls in it's installation folder.
- Hence if installed multiple versions of same software, then maultiple versions of this dll will be generated in their respective installation folder.

- so my requirement is that, my C# application'll decide from which location the dll need to loaded if multiple software installation is there(as above)

so everything will be happen at runtime.

PLease guide me soon.

Posted 15-Jan-13 2:21am
Updated 15-Jan-13 3:06am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

To answer to the question itself: use Assambly.Load[^], see: Using Reflection to load unreferenced assemblies at runtime in C#[^]

1) the framework has it's mechanism to locate assamblies, see:[^]
2) you can bind the reference to the assambly with strong name, thus, the versions could simply coexist in gac
3) There are plugin frameworks you can use

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100