A Fatal Error Has Occurred Loading The Metadata For Mscorlib.dll ((link))

ngen uninstall %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll ngen update

For further assistance, consult the (issues labeled "metadata-corruption") or the Microsoft Q&A forum. Provide your Event Log snippets, the output of dotnet --info , and the exact build number of your Windows OS for targeted help.

If the error recurs after repairs, run to test for faulty RAM. Also, check the system drive's S.M.A.R.T. status for impending failure.

Corrupted NGEN images can cause metadata loading failures:

DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:1 /LimitAccess

: Essential files or registry keys for the .NET Framework are damaged or missing. Version Mismatch

Support