I have experienced a problem similar to that of a topic previously covered
in this group - 'Regasm.exe Interop problem'. However, I would like to try
to go a little deeper so that I better understand what is happening.
As in the 'Regasm.exe Interop problem', when attempting to use my C#
component via COM interop, I get an error saying that it cannot locate the
specified file. I expect that this problem is due to the fact that I was,
to begin, using the standard '1.0.*.*' version number and then later changed
to '1.0.0.0' so that I could control the version numbers. This resulted in
the COM registration keys having more than 1 version under the
InprocServer32 registry key. As outlined in the previous post, I expect
that COM (or the SCM?) was using the most recent version (the one I was
trying to obsolete - something like 1.0.1840.2567) instead of the 1.0.0.0
that I wanted it to use.
My question is, when I look at those COM registration keys (most notably
InprocServer32) I cannot determine where the actual DLL assemblies are
located that implement a particular version. How does my system locate the
correct .NET assembly to implement the functionality? In regular COM, it
always points to a path to the DLL - how does this work with .NET assemblies
and interop?
Thanks, Tyler
Marty Garins - 17 Jan 2005 17:45 GMT
Tyler,
You should find values for Assembly, Class, CodeBase in the InprocServer32 key
The Assembly loader found in mscoree.dll will use these to load your
assembly through probing.
More information on this process can be found here.
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstep4locatingassemblyt
hroughcodebasesorprobing.asp?frame=true
Marty
> I have experienced a problem similar to that of a topic previously covered
> in this group - 'Regasm.exe Interop problem'. However, I would like to try
[quoted text clipped - 19 lines]
>
> Thanks, Tyler
Tyler - 17 Jan 2005 19:01 GMT
Thanks, I think I've isolated my problem, so that was helpful.
Tyler
> Tyler,
>
[quoted text clipped - 4 lines]
>
> More information on this process can be found here.
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstep4locatingassemblyt
hroughcodebasesorprobing.asp?frame=true
> Marty
>
[quoted text clipped - 21 lines]
> >
> > Thanks, Tyler