Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,586 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i added some Assemblies to .NET Framework's Global Access Cache, by a not-overwriting command of gacutil.exe
. and some apps stopped working, 1 of them showed this error:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Diagnostics.Process' from assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<<..>>'.
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args)
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args)
removing the added content didn't help .
but after reinstalling .NET Framework 4.8 Runtime i started getting this error instead
error CS7065: Error building Win32 resources -- Could not load type 'System.Numerics.BigInteger' from assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
i also catched this
System.TypeLoadException: Could not load type 'System.ComponentModel.DataAnnotations.ValidationResult' from assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<<..>>'.
at McMaster.Extensions.CommandLineUtils.CommandLineApplication..ctor(CommandLineApplication parent, IHelpTextGenerator helpTextGenerator, CommandLineContext context)
how to fix this ?
solution:
%windir%\Microsoft.NET\assembly
by changing it's permissions, then terminated all Explorer processes and moved all content of the folder out to temp folder .sfc /SCANNOW
in Elevated Command Prompt, it restored GAC_MSIL
and fixed 1 app .assembly
and that fixed the other ones .