I'm working with C# ASP.NET Core 6 and facing a challenge in implementing controllers inherited from ControllerBase in assemblies of the "library" type. Previously, it was possible to load packages like Microsoft.AspNetCore.Mvc.Core
version 2.2.5 or Microsoft.AspNetCore.App
version 2.2.8. This automatically added a controller when adding a NuGet package containing it to an API. However, these packages are now considered obsolete. Additionally, the same NuGet package version 6.0.0 isn't available for download from NuGet because it's now included in the standard ASP.NET Core package. But this isn't suitable for my use case as I am working with a class library.
How can I make controllers, inherited from ControllerBase, work in a class library with ASP.NET Core 6, considering the unavailability and obsoleteness of the aforementioned packages? Any guidance or alternative approaches would be greatly appreciated.
Microsoft.AspNetCore.App
version 2.2.8 is deprecated.Microsoft.AspNetCore.Mvc.Abstractions
version 6.0.0 doesn't work.Microsoft.AspNetCore.Mvc.Core version
6.0.0 doesn't work.