G
Guest
Hello,
I'm integrating some code with Visual Studio. All my code is managed, and I
make use of registration attributes and regpkg.exe to reflect over the
assembly to generate registration information. This registration information
gets places into the registry and VS goes through well known registry keys
and uses COM interop to load our packages as appropriate.
I would like some of these managed packages to make use of services from
other custom assemblies. I could place these other assemblies in the GAC,
but I'd like to avoid that. Modifying the machine configuration file
similarly seems like a bad idea. As I don't own the executable (devenv.exe)
I cannot use an application configuration file. The only option then seems
to be to use System.Reflection.Assembly.LoadFrom and specify a path, such as
a path relative to the executing assembly (e.g. the one that got loaded by VS
using COM interop).
Are there other options or best practices to follow? Is there a way to
provide hint paths or otherwise participate in assembly probing in such a
scenario, without providing a fully qualified path?
Although this question is specific to VS, the same question applies to other
products where an assembly writer does not own the executable (such as an MS
office addin scenario); if there is a means of loading a managed assembly
into the process of another executable then how can this managed assembly
make use of other assemblies as described above?
Thank you,
Notre
I'm integrating some code with Visual Studio. All my code is managed, and I
make use of registration attributes and regpkg.exe to reflect over the
assembly to generate registration information. This registration information
gets places into the registry and VS goes through well known registry keys
and uses COM interop to load our packages as appropriate.
I would like some of these managed packages to make use of services from
other custom assemblies. I could place these other assemblies in the GAC,
but I'd like to avoid that. Modifying the machine configuration file
similarly seems like a bad idea. As I don't own the executable (devenv.exe)
I cannot use an application configuration file. The only option then seems
to be to use System.Reflection.Assembly.LoadFrom and specify a path, such as
a path relative to the executing assembly (e.g. the one that got loaded by VS
using COM interop).
Are there other options or best practices to follow? Is there a way to
provide hint paths or otherwise participate in assembly probing in such a
scenario, without providing a fully qualified path?
Although this question is specific to VS, the same question applies to other
products where an assembly writer does not own the executable (such as an MS
office addin scenario); if there is a means of loading a managed assembly
into the process of another executable then how can this managed assembly
make use of other assemblies as described above?
Thank you,
Notre