-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When .NET Core 3.1 installed, "Cannot compile typed context" error #19
Comments
That's strange, I have both SDKs installed and have had LinqPad use both runtimes without any problems. The error sounds familiar though. |
I wonder if it matters what version(s) were installed when I first made use of the driver. Let me try reinstalling the driver and some other things like that. Do you know much about how LINQPad handles dependency resolution for storage drivers? |
As far as I know, in LinqPad 6, Nuget does all the dependency resolution. |
From #19, targeting only netcore3.0 might be a problem when only the 3.1 SDK is installed. The plugin can be compiled with both SDKs and only 3.1 is LTS so it's as good a time as any to start targeting the newer version.
@sblom new package published, let me know if it solves the problem 😉 |
This is a workaround for issue #20, which appears to be the opposite of #19. In the latter, the driver was given .net core 3.1 references when it was trying to target 3.0. This time, the driver is given 3.0 references while trying to target 3.1. It looks like LinqPad is downloading the 3.1 version of the driver, which tries to generate a dynamic assembly by targeting 3.1 too. This is necessary because the generated code references the driver assembly, which in this scenario targets 3.1. However, LinqPad is providing reference assemblies for .net core 3.0, which results in a compiler error. I talked about the problem with Joe Albahari and hope that in the future the driver will be able to request version-specific reference assemblies from LinqPad. In the meanwhile, since the dynamic assembly should be 3.0-compatible if it doesn't reference the 3.1 driver itself, I have removed the reference and am now compiling the required classes with the rest of the code. This way, whether LinqPad provides 3.0 or 3.1 references, the generated code is totally agnostic and works with both.
When running LINQPad 6 (have tried both 6.5.5 and 6.6.1) with .NET Core 3.1 installed, I get an error when attempting to interact with connections that use the Azure Storage Driver:
(the tooltip is truncated at that point)
If only netcore3.0 is installed, everything works fine.
If netcore3.1 and netcore3.0 are both installed, it fails. If only netcore3.1 is installed, it fails.
The text was updated successfully, but these errors were encountered: