I was just recently deploying a ASP.NET Core 3.1 web project to Azure that I was working on my spare time and realized It would not start, instead I got the following error: “HTTP Error 500.30 – ANCM In-Process Start Failure
My setup was ASP.NET Core 3.1 targeting netcoreapp3.1 and running the in-process hosting model in IIS under Azure App Service (Windows).
If your project has a package reference that transitively references certain assemblies as Microsoft.AspNetCore.Identity.UI 3.1 from NuGet packages and executes on a runtime, you will receive a runtime exception at the time the assembly is loaded with a message like:
CoreCLR Version: 4.700.19.56402
.NET Core Version: 3.1.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
File name: ‘Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation, Culture=neutral, PublicKeyToken=null’
Only workaround for now is to downgrade Microsoft.AspNetCore.Identity.UI to 3.0/3.2
Follow this open issue in github