I am developing in .net core 5.0. (There is a tutorial by Sam Xu on moving to dotnet core 5)
I have gone back to the absolute bare minimum with the most simple API project in Visual Studio.
I had this working in my project earlier in the year and it was running on .net core 5.0. See tutorial above.
In this project I have created a new project. Then I went to NuGet to get the package "Microsoft.AspNet.OData" version 7.4.1
I then added the following to the startup file.
public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddCors(); services.AddControllers(); services.AddOData(); //THIS ONE } I added "services.AddOData" and its throwing up the error,
Error CS1061 'IServiceCollection' does not contain a definition for 'AddOData' and no accessible extension method 'AddOData' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) JobsLedger.API C:\Users/.../JobsLedger.API\Startup.cs 35 Active
I had already added the package required for this service. Now I had this working a couple of months ago.
Is there a new package that you need to add?
What am I doing wrong or is this a "breaking change" that I dont know about?

using Microsoft.AspNet.OData.Extensions;in your Startup.cs?Microsoft.AspNetCore.ODatainstead? Note: Version 8.0 Preview has some breaking changes