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'

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,198 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,167 questions
.NET F#
.NET F#
.NET: Microsoft Technologies based on the .NET software framework.F#: A strongly typed, multi-paradigm programming language developed by the F# Software Foundation, Microsoft, and open contributors.
107 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 29,831 Reputation points Microsoft Vendor
    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.

    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.