Posted 15 years ago by Reis - CA
Avatar
Hi,
I'm having difficulty getting the DotNetProjectResolver to resolve assemblies that are located in a plase other than where the main executable is running.

I have the following code:

Assembly assembly = AssemblyHelper.ResolveAssembly("Assemblies", reference);
if(assembly!=null) dotNetProjectResolver.AddExternalReference(assembly);

assembly is not null and I get the following exception:

Could not load exported type data for assembly 'nunit.core, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77'.

This is occuring if the nunit.core.dll is in a subfolder to the main executable directory called "Assemblies". If I move the file to the main executable directory, everything works fine.

I have tried setting the PrivateBinPath by using:

AppDomain.CurrentDomain.AppendPrivatePath("Assemblies");

but I suspect that you are creating your own AppDomain and not using the settings of the main AppDomain.

Any advice here?

Thanks in advance,
Jonathan

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Jonathan,

That is correct, we load in a separate AppDomain. However you can attach to the AssemblyCodeRepository.AppDomainCreated event to be notified when we create one so that you can hook up to assembly resolve events there. Hope that helps!


Actipro Software Support

The latest build of this product (v24.1.1) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.