LINQPad 6.10.13 (x64) loading netcore 3.0 for Linq2db driver
I updated to v6.10.13 today and started getting errors on all of my connections to the effect that linq2db 3.0.1 requires System.Runtime version 4.2.2.0 and LINQPad was running 4.2.1.0 instead. Thos only happened on one of my computers and turned out to be quite fun to track down.
This affected both queries and schema generation in the connection list.
The issue seems to be that I had recently opened a .NET Core 3.0 project in VS2019 on that computer, causing VS to install the .NET Core 3.0 targeting pack. Even though I had the query options set to "Latest installed RTM (.NET Core 3.1.8)" the drivers appeared to be running under 3.0 instead.
After uninstalling and deleting all trace of .NET Core 3.0 from my system LINQPad is fully functional again. However I fairly frequently work on older projects with a variety of targets and it seems likely that I may encounter this problem again. Since the issue only started after the update to v6.10.13 is it safe to assume that something has changed about the framework version logic? Is there anything I can do to forbid LINQPad from attempting to use .NET Core 3.0 in future?
Comments
Try the latest beta - it includes a hack to work around this.
The root cause of the problem is that linq2db.linqpad targets 3.0, which fools LINQPad into thinking that it's OK to feed it 3.0 reference assemblies. In fact, linq2db.linqpad relies on linq2db which targets 3.1, so linq2db.linqpad should really be updated to target 3.1.
Oh dear. I thought I'd checked that. I'll get onto MaceWindu and see if we can get that tixed. You shouldn't have to work around their error.
new version published https://www.nuget.org/packages/linq2db.LINQPad/3.1.0
Mace came through pretty quick. I swear he doesn't sleep.