-
-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Summary
When I add EF Core (with SQL Server and Tools) to a .NET 9 project using Carter, I receive a Roslyn-related error when trying to run the application or generate migrations using Code First.
However, when I use only Microsoft.EntityFrameworkCore.InMemory
, everything works fine.
Reproduction Steps
- Create a new .NET 9 minimal API project.
- Add Carter.
- Add the following packages:
- Microsoft.EntityFrameworkCore.SqlServer (tried both 9.0.7 and 9.0.0)
- Microsoft.EntityFrameworkCore.Tools
- Try to run the project or execute
dotnet ef migrations add InitialCreate
.
Error Output
Unable to load one or more of the requested types.
Method 'get_IsParamsArray' in type 'Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationParameterSymbol' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
Method 'get_PartialDefinitionPart' in type 'Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationPropertySymbol' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
Method 'get_AllowsRefLikeType' in type 'Microsoft.CodeAnalysis.CodeGeneration.CodeGenerationTypeParameterSymbol' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.