You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
I have created a model here, which refers to the 3.X version of the Entity Framework.
However, the generated code contains functions available only in higher versions, despite the choice of the 3.X version.
'EntityTypeBuilder<Xyz>' does not contain a definition for 'Navigation' and no accessible extension method 'Navigation' accepting a first argument of type 'EntityTypeBuilder<Xyz>' could be found (are you missing a using directive or an assembly reference?)
Here in the Entity Framework Core source code you can see that quite well. The "Navigation" function exists only in the newer versions, in version 3.X it was not present at this point.
Did I maybe forget something, or overlooked something? Unfortunately, so far I can't get the model for the old version 3.1 to work at all. This is really a pity.
The text was updated successfully, but these errors were encountered:
- Fix to detecting correct EF version with anything with "Latest" in it is configured (see #266)
- Fix to generate correct initial value code for decimal properties (see #268)
- Fix for constructor code generation in 1-N unidirectional associations (see #263)
Progress update on this. It's been tracked down to the designer incorrectly tying the chosen EF version to capabilities (therefore, to code generation type). The fix is underway and is currently in the testing stage.
That sounds excellent! Unfortunately, I won't be able to test it today, but I will definitely do so next week. I would then give a short feedback if everything is working properly now! Have a nice weekend, and thanks for the quick analysis / possible fix of the problem!
msawczyn
added
released
Issue is resolved in a current release
and removed
pending release
Issue is resolved in the current codebase, will be published with the next release
labels
Feb 19, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugConfirmed bugreleasedIssue is resolved in a current release
I have created a model here, which refers to the 3.X version of the Entity Framework.
However, the generated code contains functions available only in higher versions, despite the choice of the 3.X version.
'EntityTypeBuilder<Xyz>' does not contain a definition for 'Navigation' and no accessible extension method 'Navigation' accepting a first argument of type 'EntityTypeBuilder<Xyz>' could be found (are you missing a using directive or an assembly reference?)
Here in the Entity Framework Core source code you can see that quite well. The "Navigation" function exists only in the newer versions, in version 3.X it was not present at this point.
Current version:
https://github.com/dotnet/efcore/blob/f54b9dcd189c91fc4b01b79c9387d23095819a8f/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs#L230
Old version 3.1:
https://github.com/dotnet/efcore/blob/release/3.1/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs
For this reason a compilation is not possible. The following packages are present in the .NET Framework 4.8 project:
Did I maybe forget something, or overlooked something? Unfortunately, so far I can't get the model for the old version 3.1 to work at all. This is really a pity.
The text was updated successfully, but these errors were encountered: