This worked fine in 2005 but gets an exception in 2008 - "could not load file or assembly or one of it's dependancies". Looking at the fusion log, which is now in the exception info window in Studio (very nice), I could see that it was looking for Test.dll.dll, Test.dll.exe. So, the extension is being appended to the end of the assembly name. After removing ".dll" from the name of the assembly, the code works fine.

Then changed the base directory for the AppDomain used by the test runner from the location of the test assemblies in VS 2005 to the IDE's folder in VS 2008, so the test assemblies can't be resolved as they used to. Using CreateInstanceFromAndUnwrap does the trick indeed.

About Me

IT professional with over 17 years of experience designing and building scalable systems as a developer and architect/team lead. Most recently focused on building web sites/services and mobile applications on Microsoft Azure and Amazon AWS cloud solutions.