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

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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@xxxxxxxxxxxxx> wrote in message
news:5y3hth6nxzhf.ft4kzxbtm0dg$.dlg@xxxxxxxxxxxxx
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


.



Relevant Pages

  • Re: Does system.dll need to be copied to the app bin directory?
    ... The Sybex book I'm using is C# Complete and it was apparently written before ... the framework 1.1 was released. ... None of the .config file examples in the ... information to the machine.config entry for my section entry and it was ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [SLE] Again: cant write to floppy
    ... And Doug, if you're nervous about changing a config file make ... it a habit to never delete an entry but comment it out. ... So your edited conf file should look: ...
    (SuSE)
  • Re: [SLE] Ports for NFS.
    ... On Tuesday 07 Sep 2004 20:03 pm, John N. Alegre wrote: ... >> the config file is, and how to restart the Firewall after the ... > get past the Firewall I am guessing that the entry ...
    (SuSE)
  • Re: remove entry from text file [NOT A HOMEWORK]
    ... Roman Mashak wrote: ... I implemented simple program to eliminate entry from the file having the following structure (actually it's config file of 'named' DNS package for those who care and know): ...
    (comp.lang.c)
  • Re: [SLE] Ports for NFS.
    ... On Tuesday 07 September 2004 13:49, John N. Alegre wrote: ... > Could you clue me on either the entry into the config file, ... Firewall I am guessing that the entry ...
    (SuSE)