References in separate Folder

Topics: Prism v4 - WPF 4
Dec 2, 2010 at 7:08 PM



i have a Shell project and three module projects. In my shell project there is a folder Modules and after every build the module files are copied to this module folder. With a DirectoryCatalog i get all the modules and if i just copy another module in this folder, i can also find it.

My problem is that one module needs some other third party binary and if this thirdpary.dll is not in my modules folder, i cannot load my module. but i only want real modules in my module-folder. can anybody help me? how to separate modules and thirdparty binaries?

Dec 3, 2010 at 6:57 AM

You could add reference to the thirdparty dll in your shell. And mark copylocal=false in your module for the dll. that way when shell is loaded the dll would be present and your module can pick it up automatically. and of course you module folder will just have module files in it.


Dec 9, 2010 at 8:08 PM

What do you mean with "the dll would be present"? When i mark copylocal as false, i get an FileNotFoundException that sais that the file yould not be found. This is what i would expect, because the file is not there. Does anybody know, how to get all my reference-files in a seperate folder? I don't want all my dlls in the folder of the shell.exe.

Dec 10, 2010 at 1:30 PM


The suggestion gan_s has given is correct. In order for this approach to work, you need to set CopyLocal to true in your reference to the third party library in the shell, and to false in your modules.

The exception you're experiencing might be because you're not setting CopyLocal to true in your reference to the third party library in the shell.

I hope you find this helpful.

Guido Leandro Maliandi

Dec 11, 2010 at 1:10 PM

ah, ok, i understood. thank you.