LinqPad6 and referencing dlls targeting older Framework versions

I must confess I am not au fait with the whole netcore/netstandard issue, but was playing with LinqPad6 as it has some new features (which I assume wouldn't be available in LinqPad5).

But when I (accidentally) run an existing script which references some of my existing dlls (this one was targeting Framework 4.5.1) I discovered that it almost worked.

The stack trace shows that it is loading and running the code from my legacy dll but then throws the exception
Could not load file or assembly 'System.Data.SqlClient, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

I can't add this a framework dll as LinqPad6 does not have this feature. I tried loading this from Nuget, but this loads a newer version and LinqPad6 does not have an app.config to allow a binding re-direct.

Is there a way around this?


  • I'm including some improvements to assembly resolution in the next build, but I wouldn't count on it fixing the problem.

    The ability to reference .NET Framework assemblies from .NET Core is very limited. Microsoft have designed it so that it works only in simple cases.
  • I'm getting the exact same issue, please is there any way around this? would using an older version of linqpad work?

  • I installed linqpad5 and it worked

  • I am having the same.

    Works fine with V5, but System.Data.OLEDB not working the same with V6. Tried loading a nuget and eventually got it working by disabling some references, but was getting a lot of messages regarding ambiguity in the System.Data class typically associated with duplicate namespace imports. Possible issues:

    *Some of these libraries are loaded behind the scenes already and import of the namespaces might be redundant?
    *Some data stored in the query header?

    Like the original poster, I am possibly just confused between .Net Core vs old framework?

Sign In or Register to comment.