Giter Club home page Giter Club logo

Comments (18)

ili avatar ili commented on June 10, 2024

That would be great if possible.
Do you know if x64 IBM.Data.*.dll and if yes where can we get them?

from linq2db.linqpad.

maximpashuk avatar maximpashuk commented on June 10, 2024

You know, I am not using DB2 at all.
Exception I get thrown when I want to connect to MS SQL Server.

But I googled a link
http://www-01.ibm.com/support/docview.wss?rs=4020&uid=swg27016878

Hope this helps.

I can see that client libraries used in linq2db is outdated (version 9.7 used, but current is 11.1).
I think core lin2db project should be updated to support both x86 and x64 versions.

As for me, I am not sure should linq2db support DB2 at all.

from linq2db.linqpad.

ili avatar ili commented on June 10, 2024

Thanks a lot!

from linq2db.linqpad.

jakesays-old avatar jakesays-old commented on June 10, 2024

I just came across this issue. My suggestion is to allow the linqpad driver to function when provider dlls are missing so that the ones we can delete the ones we dont need.

from linq2db.linqpad.

NimaAra avatar NimaAra commented on June 10, 2024

Any update on this please?

from linq2db.linqpad.

ili avatar ili commented on June 10, 2024

In next versions we'll switch off loading x86 providers in 64 bit environment.
For now I can only suggest not using Any CPU build :(

from linq2db.linqpad.

NimaAra avatar NimaAra commented on June 10, 2024

okay, sounds good. Any idea when the next version will be out?

from linq2db.linqpad.

halleck1 avatar halleck1 commented on June 10, 2024

Unfortunately, the fix that you did Igor is not really working (see screenshot below). The problem still exists with the change in the screenshot because the check is done in the runtime, while the BadImageFormatException happens during the assembly loading and binding. Unfortunately, the only real fix for LINQPad AnyCPU on 64 bit OS is to remove all references to the offending assemblies (DB2, Informix and Oracle Native).

I did it and it works after rebuild. Just in case you want to incorporate the changes Igor, I'm also attaching the diff file.

untitled
linq2db.patch.zip

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

Unfortunately we need more clever solution with dynamic assembly loading.

from linq2db.linqpad.

jogibear9988 avatar jogibear9988 commented on June 10, 2024

a try catch around does not help?

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

Project has references, so libraries will be loaded automatically. And proposed solution just removes a lot of providers that do not support x64 mode.

from linq2db.linqpad.

jogibear9988 avatar jogibear9988 commented on June 10, 2024

Are the Librarys only referenced or are they also used?

from linq2db.linqpad.

halleck1 avatar halleck1 commented on June 10, 2024

The libraries are referenced and hence are automatically loaded by .NET Fusion (assembly loading code).

There is no clever solution unfortunately unless you want to resort to dynamic assembly loading and wrapping their types. The alternative is rather to produce 2 builds of plugin for x86 and x64 platforms with preprocessor conditions removing the offending pieces of code.

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

It is not too hard to load assemblies dynamically. But i have not time do do that right now.

from linq2db.linqpad.

halleck1 avatar halleck1 commented on June 10, 2024

It's not hard, but you'd need to re-wrap every single class from them in your custom loader. It's just going to be a pain in the neck.

The other alternative could be to host the main plugin entry point in the new dll which would hook up to the AppDomain.CurrentDomain.AssemblyResolve event and would suppress the exception on 64 bit OS. It would then need to hide those specific providers from the UI as well.

from linq2db.linqpad.

halleck1 avatar halleck1 commented on June 10, 2024

Also, for anyone else looking for the plugin which would work on 64 bit OS - here's the build that works for me.
linq2db.LINQPad.zip

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

Working on version that loads data providers dynamically, expect this after 2.0 release.

from linq2db.linqpad.

sdanyliv avatar sdanyliv commented on June 10, 2024

Fixed in #11

from linq2db.linqpad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.