linq2db / linq2db.LINQPad

linq2db.LINQPad is a driver for LINQPad.
MIT License
74 stars 24 forks source link

MS Access #74

Closed zangra closed 2 years ago

zangra commented 2 years ago

Describe your issue.

If you have a question, first try to check our documentation, especially FAQ and search in issues and discussions - maybe your question already answered there.

If you still have questions or want to start general discussion, please create new topic in discussions.

If you are seeing an exception, include the full exceptions details (message and stack trace).

Exception message:
Stack trace:

Error instantiating type MSAccessDataContextDriver.MSAccessDataContextDriver in C:\AppData\Local\LINQPad\Drivers\DataContext\NetCore\MSAccessDataContextDriver\MSAccessDataContextDriver.dll
  - Driver assembly targets .NET Framework. Your driver assembly must target .NET Core.   at LINQPad.Extensibility.DataContext.DriverProxy.Instantiator.Instantiate(String assemblyPath, String typeName, String internalID)

### Steps to reproduce
Try to open an existing connection from LinqPad 6.
Error message.

```c#
<code with error and mapping classes>

Environment details

linq2db version: 4.1.0.0 Database Server: MS Access Database Provider: Microsoft Access (ODBC) Operating system: Windows 10 .NET Framework: 4.6

viceroypenguin commented 2 years ago

@zangra - moved to proper repo. Will debug tomorrow.

MaceWindu commented 2 years ago

Error message is from LINQPad (Driver assembly targets .NET Framework. Your driver assembly must target .NET Core). You built custom context as .net framework assembly and try to load it to linqpad 6+

You need to use linqpad 5 for .net framework assemblies or rebuild it against .net core