.NET Upgrade Assistant Errors when trying to run app

SuperCoder 276 Reputation points
2023-12-01T16:16:04.8833333+00:00

I used the .NET Upgrade Assistant (in place option) to convert a .net framework 4.7.2 to .net 7.0 and the conversion produced no errors. However when I try to run the app in VS 2022, I receive 492 errors. How do I fix this?

Net70Errors

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Tianyu Sun-MSFT 34,691 Reputation points Microsoft External Staff
    2023-12-04T07:02:28.8866667+00:00

    Hello @SuperCoder ,

    Welcome to Microsoft Q&A forum.

    Please right-click your project > Unload Project > right-click it again > Edit Project File, then check the .xxproj file(project file).

    Refer to this document: You re-target a project to a different version of .NET and references aren’t resolved and correct the form of the references.

    If you are using some NuGet packages, make sure that they support .NET 7.0. If you find that one doesn’t support .NET 7.0, try to update it or search for another one which supports .NET 7.0 and replace the previous one.

    Sincerely,

    Tianyu


    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 additional answers

Sort by: Most helpful

Your answer

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