EF Core: Could not load file or assembly 'netstandard, Version 2.0.0.0'

Hoping someone has an answer or suggestion...

We have a netstandard 2.0 project targeting net462, however when attempting to add a connection to the assembly that contains the EF Core DbContext we get the error "Cannot load assembly: Could not load file or assembly 'netstandard, Version 2.0.0.0, ...' or one of its dependencies. The system cannot find the file specified."

We are using the EF Core 2.01 driver with version 5.28.03 of LINQPad as well as 5.26.01, both exhibit the same behaviour.

I have read through various comments but haven't found much to go on. Is there are trick or some pre-processing, publishing or building magic that we need to do to be able to use EF Core?

Thanks in advance.

Comments

  • Can you expand the exception and look at the properties of the inner exception? The netstandard assembly itself will be present, but it's possible that another dependency is missing. If you look at the inner exception and its properties (e.g., LoaderExceptions), it might say which other assembly is missing.
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!