Posted 15 years ago
by Reis
- CA
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
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