HighTechTalks DotNet Forums  

Re: "Class not registered" error when assembly registered with multiple versions

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Re: "Class not registered" error when assembly registered with multiple versions in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Phil Wilson
 
Posts: n/a

Default Re: "Class not registered" error when assembly registered with multiple versions - 09-21-2007 , 05:34 PM






Try a bindingredirect from 1.0.2819.34866 to 1.0.0.0. IIRC that should
work. When the framework starts up to look for your assembly I believe it
takes note of redirects in your config file.

Alternatively you need to fix up the CLSID registration entries. There'll
be registration that refers to an assembly version of 1.0.2819.34866 that
you want to change to 1.0.0.0.
--
Phil Wilson
[MVP Windows Installer]

"Daniel Lidström" <someone (AT) microsoft (DOT) com> wrote

Quote:
Hello!

I have registered a C# private assembly with two versions (using regasm),
so that the registry contains entries like this:

...\InprocServer32\1.0.0.0 <= I want this
...\InprocServer32\1.0.2819.34866 <= unfortunate mistake

This was before I fixed the assembly version to 1.0.0.0. Now I'm trying to
create COM objects from C++, but COM reports Class not registered. It is
the 1.0.2819.34866 entry that messes things up. If I remove this entry (it
should not be there, really) everything works fine. Unfortunately, while
this is easy for me to do, for my clients it is not.

Is there a way I can force my application to load a specific version? I am
not using the GAC, but COM.

I have created a geo.exe.config like this:

?xml version ="1.0"?
configuration
startup
supportedRuntime version="v1.1.4322" /
/startup
runtime
assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
dependentAssembly
assemblyIdentity name="Roadrunner"
version="1.0.0.0"
publicKeyToken="baaf840ae384ab38"
culture="neutral" /
/dependentAssembly
/assemblyBinding
/runtime
/configuration

This hasn't helped though. Any help is much appreciated!

Thanks in advance!

--
Daniel



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.