In process hosting is not supported for AspNetCoreModule erro in Azure Pipeline .netcore 3.1

When I upgrade from .netcore 2.2 to .netcore 3.1 I got In process hosting is not supported for AspNetCoreModule issue as in the picture
For my case, I notice this config in web.config file

Change config to use AspnetCoreModuleV2 as below, the problem will be fixed
