Microsoft.OData mismatch Microsoft.OData.Core and Edm

Steps:

  1. Create a new .net 9 application
  2. Add data source
  3. Build the application
    Results:
    1>CSC: Error CS1705 : Assembly 'Microsoft.AspNetCore.OData' with identity 'Microsoft.AspNetCore.OData, Version=9.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.OData.Core, Version=8.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.OData.Core' with identity 'Microsoft.OData.Core, Version=8.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

1>CSC: Error CS1705 : Assembly 'Microsoft.AspNetCore.OData' with identity 'Microsoft.AspNetCore.OData, Version=9.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.OData.Edm, Version=8.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.OData.Edm' with identity 'Microsoft.OData.Edm, Version=8.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

I saw this problem yesterday, and this is how I fixed it.
Open the Manage Nuget Packages option by
(1) Right-clicking on your Project.
(2) Click the Browse Tab
(3) In the Search Box on the upper right, type "Microsoft.OData"
(4) Search the Package Listing for Microsoft.OData.Core and Microsoft.OData.Edm and Install the Latest Version available, which is 8.2.3.
(5) Hit F5 and Rebuild your Project or Solution.

It looks like the Nuget Package Definition was/is broken.

Thanks for this, it helped