Home > OS >  Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyTok
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyTok

Time:04-13

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.

CodePudding user response:

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

  • Related