Mesmo inserindo o:
public void ConfigureService(IServiceCollection service)
{
service.AddRouting();
}
fica dando esse erro:
System.InvalidOperationException: 'Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddRouting' inside the call to 'ConfigureServices'