How can i solve this error

Poul Hansen 20 Reputation points
2025-01-05T22:07:00.1966667+00:00

When trying to open a VS19 project with VS22, the Designer gives this error

The type 'System.Configuration.ApplicationScopedSettingAttribute' could not be found.

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. S.Sengupta 24,716 Reputation points MVP
    2025-01-06T01:29:44.1633333+00:00

    This error typically occurs due to missing or incorrect framework references when migrating from Visual Studio 2019 to Visual Studio 2022.

    Right-click on the project in Solution Explorer

    Select Properties

    Verify the Target Framework is appropriate (e.g., .NET Framework 4.8)

    If the above doesn't help:

    Build > Clean Solution

    Delete the bin and obj folders

    Rebuild the solution

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,451 Reputation points Microsoft External Staff
    2025-01-06T03:53:32.2533333+00:00

    Hello @Poul Hansen,

    Looks like the error only appears when using the designer. Please try to clear some cache files and see if it works.

    Close VS 2022, delete the bin, obj and the hidden .vs folder(in your solution folder). Restart VS 2022 and reopen your project, rebuild the project, check again.

    As the error message mentioned that it can’t find the type, if this error persists, try to install the corresponding NuGet package into your project(Right-click your project => Manage NuGet Packages => Browse => search "System.Configuration.ConfigurationManager" => click to install).

    User's image

    Best Regards,

    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 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.