vijayamadhavareddy / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Elmah SQLite logging does not work with System.Data.SQLite.DLL 1.0.65.0 #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download and install elmah
2. replace provided System.Data.SQLite.DLL with latest version from http://
sqlite.phxsoftware.com/
3.

What is the expected output? What do you see instead?
Elmah should work

You get:
Could not load file or assembly 'System.Data.SQLite, Version=1.0.61.0, 
Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its 
dependencies. The located assembly's manifest definition does not match 
the assembly reference. (Exception from HRESULT: 0x80131040) 

Please use labels and text to provide additional information.

Original issue reported on code.google.com by cop...@gmail.com on 13 Jan 2010 at 9:34

GoogleCodeExporter commented 9 years ago
If the new version is 100% compatible, you can use standard assembly 
redirection in 
.NET to use the new version instead of the 1.0.61.0 referenced in ELMAH. See 
the 
following topic in MSDN for more information:

http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx

I've closed this issue as Invalid as it is not an issue with ELMAH per se. We 
can 
revisit and open the issue if the above does not help.

Original comment by azizatif on 13 Jan 2010 at 9:40

GoogleCodeExporter commented 9 years ago
i have no idea how to implement it.

Original comment by cop...@gmail.com on 13 Jan 2010 at 9:43

GoogleCodeExporter commented 9 years ago
i don't mind updating the source if there is an entry where i could change

Original comment by cop...@gmail.com on 13 Jan 2010 at 9:50

GoogleCodeExporter commented 9 years ago
also why this not related to ELmha? Im using latest version of SQLite .net on 
my 
project and it works fine. Its just elmah creates error

Original comment by cop...@gmail.com on 13 Jan 2010 at 10:00

GoogleCodeExporter commented 9 years ago
ok done it with

<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139"/>
        <bindingRedirect oldVersion="1.0.61.0" newVersion="1.0.65.0"/>

Original comment by cop...@gmail.com on 13 Jan 2010 at 10:06

GoogleCodeExporter commented 9 years ago
> <assemblyIdentity
>   name="System.Data.SQLite" 
>   publicKeyToken="db937bc2d44ff139" />
> <bindingRedirect 
>   oldVersion="1.0.61.0" 
>   newVersion="1.0.65.0" />

That's it! You got it! :)

> also why this not related to ELmha?

Just FYI, this is a policy of the runtime. Assemblies that reference 
strong-named 
assemblies will only be bound to those version at runtime. If your project 
references 
a different version of SQLite than ELMAH then you need to have both versions 
present 
on the system for the respective bindings to work. If you only want to maintain 
a 
single and more recent version and are certain it is 100% compatible to the 
older one 
then you can tell the runtime otherwise and that's what the <bindingRedirect> 
configuration helps with.

Original comment by azizatif on 13 Jan 2010 at 10:44