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.

DERIQUITO, ARCHIMEDES R 1 Reputation point
2023-12-06T00:38:57.6633333+00:00

Got this error when running a C# console app in VS 2019:

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.

Please help.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,744 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. DERIQUITO, ARCHIMEDES R 1 Reputation point
    2023-12-06T01:32:50.1533333+00:00

    Solved the problem. Installed a needed assembly in the global assembly cache using gacutil -i "dll full pathname".


  2. DERIQUITO, ARCHIMEDES R 1 Reputation point
    2023-12-06T23:23:08.3133333+00:00

    This is odd. I executed the script task that uses the assembly in SSIS during a presentation and it worked multiple times. Then afterwards, I continued working on the SSIS package and, without even closing VS, the script started breaking again with the same error. I exit VS, ran gacutil again but it didn't fix the problem this time. I rebooted my laptop, ran gacutil but the problem still persists. Please help. VS seems to be very unstable.

    0 comments No comments

  3. DERIQUITO, ARCHIMEDES R 1 Reputation point
    2023-12-07T02:12:50.7166667+00:00

    The problem disappeared when I uninstall the assembly from GAC. This is funny. First time I got the problem I installed the assembly to the GAC to resolve it. The second time the problem occurred I had to uninstall it.

    0 comments No comments