I'm writing a nuget package targetting both net6.0 and netstandard2.0. Inside I need to use WebApplication (and other stuff found in AspNetCore which works with net6.0). In net6.0 i use
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
How can I use these objects when compiling in netstandard2.0 ? I can't find the packages to use for that.
So basically, how do I use the AspNetCode services inside a netstandard2.0 library ?
Edit to clarify the subject
I actually have a .net core app running in a console, using websocket and http resources. That app needs to run in a windows service which is a .net framework solution. I understand I can't use AspNetCore but can't find a way to use anything else and nuget is populated with so many deprecated packages I don't know what to use here. Could it be AspNet ? Then how do I identify the necessary packages I need according to the uses described above (I must be dumb here not being able to do it)