Found the problem as also the project Build successfully one package was not compatible with .NET 9 (Yet).
The Development environment shouldn't be enabled for deployed applications error after upgrading to .NET 9
Hi,
After upgrading my ASP.NET Core web app from .NET 8 to .NET 9 and published it to IIS using Web Deploy on Release mode I am receiving this error in the browser:
Error.
An error occurred while processing your request.
Request ID: xxxxxxxxx
Development Mode
Swapping to the Development environment displays detailed information about the error that occurred.
The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.