- Apr 30, 2005
- 81
- 0
- 66
Hi,
I have a C++ (COM) server that loads a C# assembly via COM Interop. That assembly in turn is loading another assembly by name ( e.g. Assembly.Load( "someAssemblyName, 1.0.0.0" ); ). The assemblies exist in the same directory as the server and all works well.
What I would like to do is deploy an updated version of "someAssemblyName" at runtime. I have added a new <codebase> to "Server.exe.config" with @version = 1.0.0.1 and @href = file://some_full_path_to_v1.0.0.1_assembly.
This doesn't work as expected. No matter which version I pass to Assembly.Load(), the first <codebase> entry is the one that gets loaded. Once a version is loaded it is always returned, so changing the order in the .config file at runtime does not help. Any ideas?
- Pulling Hair
Additional Info:
1. These assemblies are private and therefore not installed to the GAC.
2. These assemblies are not strong-named. I tried strong-naming them which resulted in nothing being loaded and no useful exception information.
I have a C++ (COM) server that loads a C# assembly via COM Interop. That assembly in turn is loading another assembly by name ( e.g. Assembly.Load( "someAssemblyName, 1.0.0.0" ); ). The assemblies exist in the same directory as the server and all works well.
What I would like to do is deploy an updated version of "someAssemblyName" at runtime. I have added a new <codebase> to "Server.exe.config" with @version = 1.0.0.1 and @href = file://some_full_path_to_v1.0.0.1_assembly.
This doesn't work as expected. No matter which version I pass to Assembly.Load(), the first <codebase> entry is the one that gets loaded. Once a version is loaded it is always returned, so changing the order in the .config file at runtime does not help. Any ideas?
- Pulling Hair
Additional Info:
1. These assemblies are private and therefore not installed to the GAC.
2. These assemblies are not strong-named. I tried strong-naming them which resulted in nothing being loaded and no useful exception information.