I'll give a try to a more recent code checkout that what I work with (before svn to mercurial migration) but don't think the problem is related to base code, correct me if I'm wrong.
I have troubles with following : I launch an application and CC's PluginManager looks for plugins (method : FindPlugins, use of Assembly.LoadFrom(strPath)). When it encounters ClearCanvas.Dicom.Codec.Jpeg.dll :
- if called from an NUnit test, the dll loads correctly and the plugin is added to list of plugins.
- if called from asp.net application, the dll loading throws a bad image format exception and thus I don't have this codec as an available plugin...
Some technical details :
- I use VS 2010, framework .NET 4
- For the unit test project, every useful dll (CC's C# code or C++ codecs) are all in [my project]\bin\x64\Debug directory. Unit test calls my C# code which calls ClearCanvas.
- For the asp.net project, I put ClearCanvas.Common.dll into website's bin directory, and all the other C# or C++ dlls into a directory named "plugins" besides "bin", because dlls are found if I setup like this. I did debug.
- The asp.net project is a very simple site : it references a WCF service, with a .svc file. It is useful to expose the WCF over http protocol when hosted in IIS (7). Now I'm doing local tests without IIS, only two instances of VS 2010, one running the website with WCF, the other one running what I need to call the website with WCF on its .svc url.
- I did another test, tell my main app to directly call WCF hosted by VS (main app and WCF are launched at once in a VS instance) : I have the same behavior than with unit test case : all dlls are in same directory and Jpeg codec C++ dll loads fine.
Thanks for any explaination and solution... my goal is to make call to WCF work in test environment (IIS hosting). If I cannot achieve this, I will host my WCF as a Windows service on test server...