-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add-Migration failing with new Microsoft.CodeAnalysis.Workspaces v4.10.0 #33970
Comments
Have a similar issue. Going back to "4.9.2" fixed it for now. |
Duplicate of #32926 |
Its not a duplicate, as it is a current problem and not in next major release in half a year |
@Roj At the mentioned PR there is only an update to v4.8 - this is still not the latest version. And there are breaking changes from 4.9.2 to 4.10 |
@roji Could you please consider the comment from @pocki . It seems that he mentioned a wrong person in his comment. Right now we cannot add any new EF Core migrations with Microsoft.CodeAnalysis.* packages version 4.10.0 because of this issue. |
Ropening to make sure we do the right thing for 9.0 here. |
back to previous version solved the problem on my project |
@roji To update. |
I've consulted about this internally, and we're not going to be changing the Microsoft.CodeAnalysis version in EF 9.0. IIUC upgrading to 4.10.0 would preclude usage of VS 17.8 and 17.9 for no good reason, and the recommendation in general is to not just upgrade unless our analyzers/source generators actually need a feature from the newer versions. Note that EF 10 will very likely target the net10.0 TFM, at which point older VSs probably won't be supported anyway; there's a good chance we'll upgrade our Microsoft.CodeAnalysis as well. Until then, the workaround above of manually using 4.9.2 (or whatever works) seems very reasonable. |
@roji Thanks for the update. My case as example: I can't use .NET9 and EF Core together with Microsoft.Powershell.SDK 7.5 (Powershell 7.5 is based on .NET9) |
@pocki I understand, and it's indeed an unfortunate situation. The thing is that we're not seeing a lot of people using EF through Microsoft.Powershell.SDK, or running into other similar issues - this issue has only one vote... And upgrading to 4.10.0 brings its own problems as we've seen. The good news is at least that this problem will at some point go away on its own, and until then there seems to be a decent workaround, with the user explicitly setting the version to 4.9.2 etc. Hopefully that's good enough for the time being. |
Bug Microsoft.CodeAnalysis.* version dependencies
ASP.NET Core Web API with EF Core 8.0
I need to reference Microsoft.CodeAnalysis.* directly with a newer version (instead of v4.5.0) because of other dependencies like Powershell.SDK - see #32070
This was working fine until v4.9.2 of Microsoft.CodeAnalysis.* packages. Except the warning about version mismatch.
After update to v4.10.0 the Add-Migration crashes.
Please make it working also with newer versions of Microsoft.CodeAnalysis. and don't stick to an (very) old version.
Directory.Packages.props:
Stack traces
Provider and version information
EF Core version: 8.0.6
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system: Windows 11 23H2 (Build 22631.3737)
IDE: Visual Studio 2022 17.10 and Visual Studio 2022 17.11 Preview 2.0
The text was updated successfully, but these errors were encountered: