how to fix this?

XareXD 0 Reputation points
2024-05-01T10:26:25.1133333+00:00

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Developer technologies | .NET | .NET Runtime
Developer technologies | .NET | F#
Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2024-05-02T03:05:07.5133333+00:00

    Hi @XareXD

    Welcome to Microsoft Q&A! 

    Which version of Visual Studio are you using? What are your project type and target framework? 

    Please close all running VS instances and open the Visual Studio installer > Modify > Individual components tab > ensure that the .NET SDK is installed. 

    You can remove all package references and add them again using NuGet Package Manager

    Or create a new project and check if it occurs in specific projects or not. 

    If it doesn’t work, please share us more detailed information to investigate it further. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.