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=4.6.0.0, 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?

Comments

  • 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.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!