2
votes

I am new to LinqPad. I started using LinqPad5 and adding connection using 'use a typed data context from your own assembly' option. My entities are part of ASP.Net Core 1.0 website project. After download, I selected 'Entity Framework Core 1.1' driver, and then in 'Path to Custom Assembly' I selected the generated assembly for my web site. After selection it gives me following error:

Error loading custom assembly: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I have tried selecting assembly from both bin\release\netcoreapp1.0 and bin\release\publishoutput folder but it gives the same error.

1

1 Answers

10
votes

As stated in the driver download page, "Your project must target .NET Framework - not .NET Core."

In other words, the driver supports ASP.NET Core for .NET Framework, not ASP.NET Core for .NET Core.

The reason for this is that LINQPad is a .NET Framework application, and right now you cannot reference a .NET Core assembly from a .NET Framework application. The frameworks are incompatible.

The situation should improve later this year, with the release of .NET Core 2.0. You should then be able to put your data context into a projects that targets .NET Standard 2.0, which will be compatible with LINQPad.