codeice / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

Hard dependency on specific version (1.2.11.0) of log4net #106

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Change references in all projects to be an older version of log4net like 
1.2.10.0
2. Access LinqToExcel.ExcelQueryFactory.Worksheet[TSheetData](String 
worksheetName)

What is the expected output? 
Nothing. It would be nice if this nuget package had a nuget dependency on 
log4net so it would be kept in sync.

What do you see instead?
System.IO.FileLoadException: Could not load file or assembly 'log4net, 
Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of 
its dependencies. The located assembly's manifest definition does not match the 
assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'log4net, Version=1.2.11.0, Culture=neutral, 
PublicKeyToken=669e0ddf0bb1aa2a'
   at LinqToExcel.Query.ExcelQueryExecutor..ctor(ExcelQueryArgs args)
   at LinqToExcel.Query.ExcelQueryable`1..ctor(ExcelQueryArgs args)
   at LinqToExcel.ExcelQueryFactory.Worksheet[TSheetData](String worksheetName)

What version of the product are you using? On what operating system?
1.7.1 on Windows 7

Please provide any additional information below.

I even have a binding redirect in my app.config
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.11.0" newVersion="1.2.10.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Original issue reported on code.google.com by mikewred...@gmail.com on 1 May 2014 at 8:11

GoogleCodeExporter commented 8 years ago
I have this same issue and it is driving me mad. It looks like I have to change 
the log4net version of my whole project.

Original comment by dustin.l...@gmail.com on 13 Jun 2014 at 10:46

GoogleCodeExporter commented 8 years ago
Sorry, I don't have time to make this change myself. But I am happy to accept 
pull requests from anybody that does have time to make this change.

Original comment by paulyo...@gmail.com on 18 Jun 2014 at 9:14

GoogleCodeExporter commented 8 years ago
To make it worst, log4net has signed 1.2.11 with two different public key and 
linqToExcel picked a different one compared to the one my company uses. So its 
either changing all the references in the assemblies in my company or give up 
on LinqToExcel or download the source and rebuild linqToExcel.

It's very bad for 3rd party lib to have hard coded version of specific 
libraries.

And curses Log4Net having 2 different public keys.

Original comment by laubo...@gmail.com on 18 Jul 2014 at 4:22

GoogleCodeExporter commented 8 years ago
version 1.8.1 now references Log4Net through its NuGet package, so see if this 
helps you now.

Original comment by paulyo...@gmail.com on 28 Jul 2014 at 1:45