'Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken-b03f5f7f11d50a3a' or one of its dependencies

This is the exception it throws after running an ordinary C# program that prints to console:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime,
Version=6.0.0.0, Culture=neutral, PublicKeyToken-b03f5f7f11d50a3a' or one of its dependencies. The system 
cannot find the file specified.

I'm using MS Visual Studio with .NET 6.0.



Solution 1:[1]

You provided almost no information

  • Do you link some libraries
  • What is ordinary C# program? (console?)
  • Try create new project and compare both versions

This error is almost in 99% cases caused by missing some dll. Double check your output bin directory, and compare with your references.

Tip: maybe wrong .net versions

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 PavelP