Skip to content

EF Projectables requires the build machine to have NET 10 installed but this isn't documented. #203

@AdamGovier

Description

@AdamGovier

One of our team members pulled down a project of ours over the weekend.

He was getting this runtime exception:

System.InvalidOperationException: Unable to resolve generated expression for X.X.X.API.Domain.Entities.X.X.X.

Further investigation this morning found the following warning:

CSC : warning CS9057: Analyzer assembly
'...\entityframeworkcore.projectables.abstractions\6.0.2\analyzers\dotnet\cs\EntityFrameworkCore.Projectables.Generator.dll'
cannot be used because it references version '5.0.0.0' of the compiler,
which is newer than the currently running version '4.14.0.0'.

We compared the NET SDK versions of their machine compared to mine:

Their machine:

.NET SDKs installed:
9.0.310 [C:\Program Files\dotnet\sdk]

My machine:

.NET SDKs installed:
  8.0.410 [C:\Program Files\dotnet\sdk]
  9.0.305 [C:\Program Files\dotnet\sdk]
  10.0.103 [C:\Program Files\dotnet\sdk]

The project's target framework is NET8.

After finding this difference, they installed NET10 and the runtime exception was resolved. As a further test, they removed NET10 and ran the project without rebuilding and it still runs as expected with NET9.

I am unsure of the version number links between the compiler and NET version. However it seems that NET10 must be installed in order to generate the projections.

Recomended next steps

Outline this requirement in the documentation.

At https://efnext.github.io/guide/quickstart.html change the prerequisites to read something like this:

EF Core Projectables is compatible with target frameworks NET8, NET9 & NET 10 but NET10 must be installed on the build machine for source generation.

Let me know if you need a hand adjusting the docs.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions