VS2008, Excel Add-in, Problems with Reflection

A

Alexander Pachwald

Hi!

I started developping an Excel Add-in using VS2008 today and ran into
some problems while using a set of third party assemblies. I added
references to the libraries I want to use and startet programming.

The first "Hello World" - test ended quite disappointing as one of
these assemblies does something like this:

// Load assembly library.dll
AssemblyFile =
Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(this.GetType()).Location)
+ "\\library.dll";
asm = System.Reflection.Assembly.LoadFrom(AssemblyFile);

As this assembly is moved to a directory way below C:\Dokumente und
Einstellungen\[username]\Lokale Einstellungen\Anwendungsdaten\assembly
(sorry, german machine...) for execution, this library.dll is not
where it is expected to be.

Is there a way to make a managed Excel Add-in use libraries which are
in a special location on the client machine (like "c:\Programme
\Installed App\") without moving them around? I even tried to use
reflection to access this special library. After starting to debug, I
realized that even then this dll is moved to the local settings path.

Does anybody know what to do?

Thanks,
Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top