Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353133 - dev-lang/mono-2.8.1-r1 wrong registration of Npgsql.dll in GAC
Summary: dev-lang/mono-2.8.1-r1 wrong registration of Npgsql.dll in GAC
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: dotnet project
URL: https://bugzilla.novell.com/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-29 12:30 UTC by Arsen Shnurkov
Modified: 2016-01-14 18:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arsen Shnurkov 2011-01-29 12:30:24 UTC
# gacutil -l Npgsql
The following assemblies are installed into the GAC:
Npgsql, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
Npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
Npgsql, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
Number of items = 3


Versions 2.0.0.0 and 4.0.0.0 are registred during "emerge mono". They shouldn't.
Version 2.0.11.0 is the latest version, which is registred according to 
http://npgsql.projects.postgresql.org/docs/manual/UserManual.html


Web site loads version 4.0.0.0 (it comes from mono-2.8.1 package).
This leads to the following error:

Cannot cast from source type to destination type.
Description: HTTP 500. Error processing request.

Stack Trace: 

System.InvalidCastException: Cannot cast from source type to destination type.
  at Npgsql.NpgsqlFactory.CreateConnection () [0x00000] in /var/tmp/portage/dev-lang/mono-2.8.1-r1/work/mono-2.8.1/mcs/class/Npgsql/Npgsql/NpgsqlFactory.cs:64
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2011-02-02 11:47:24 UTC
Your app should load the assembly it was compiled against or fail to compile. I presume the failure to do so is due to the bug in URL.
Comment 2 Arsen Shnurkov 2011-02-02 12:31:05 UTC
> the failure to do so is due to the bug in URL.

In which URL ?
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2011-02-02 14:03:02 UTC
(In reply to comment #2)
> > the failure to do so is due to the bug in URL.
> 
> In which URL ?
> 

The clicky thingamajig below "Assigned To"
Comment 4 Alistair Bush (RETIRED) gentoo-dev 2011-02-02 18:49:19 UTC
Could you give us more detail on the application your running,  is it something your developing,  or is it thirdparty?

As a workaround have you tried adding assemblyBindings to your web.config?

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="myAssembly"
                              publicKeyToken="32ab4ba45e0a69a1"
                              culture="neutral" />
            <bindingRedirect oldVersion="1.0.0.0"
                             newVersion="2.0.0.0"/>
            <codeBase version="2.0.0.0"
                      href="http://www.litwareinc.com/myAssembly.dll"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
Comment 5 Pacho Ramos gentoo-dev 2011-07-04 10:24:06 UTC
(In reply to comment #4)
> Could you give us more detail on the application your running,  is it something
> your developing,  or is it thirdparty?
> 
> As a workaround have you tried adding assemblyBindings to your web.config?
> 
> <configuration>
>    <runtime>
>       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>          <dependentAssembly>
>             <assemblyIdentity name="myAssembly"
>                               publicKeyToken="32ab4ba45e0a69a1"
>                               culture="neutral" />
>             <bindingRedirect oldVersion="1.0.0.0"
>                              newVersion="2.0.0.0"/>
>             <codeBase version="2.0.0.0"
>                       href="http://www.litwareinc.com/myAssembly.dll"/>
>          </dependentAssembly>
>       </assemblyBinding>
>    </runtime>
> </configuration>

Any news here? (with latest mono-2.10 please)
Comment 6 Pacho Ramos gentoo-dev 2011-09-10 11:42:24 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Could you give us more detail on the application your running,  is it something
> > your developing,  or is it thirdparty?
> > 
> > As a workaround have you tried adding assemblyBindings to your web.config?
> > 
> > <configuration>
> >    <runtime>
> >       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> >          <dependentAssembly>
> >             <assemblyIdentity name="myAssembly"
> >                               publicKeyToken="32ab4ba45e0a69a1"
> >                               culture="neutral" />
> >             <bindingRedirect oldVersion="1.0.0.0"
> >                              newVersion="2.0.0.0"/>
> >             <codeBase version="2.0.0.0"
> >                       href="http://www.litwareinc.com/myAssembly.dll"/>
> >          </dependentAssembly>
> >       </assemblyBinding>
> >    </runtime>
> > </configuration>
> 
> Any news here? (with latest mono-2.10 please)