ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VS2008, Excel Add-in, Problems with Reflection (https://www.excelbanter.com/excel-programming/401552-vs2008-excel-add-problems-reflection.html)

Alexander Pachwald[_2_]

VS2008, Excel Add-in, Problems with Reflection
 
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.G etAssembly(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


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com