Visual Studio - Forms designer won't load. Displays the error: "The type 'System.Configuration.ApplicationScopedSettingAttribute' could not be found"

James Buss 136 Reputation points
2021-07-21T16:31:12.13+00:00

The full error message says, "The type 'System.Configuration.ApplicationScopedSettingAttribute' could not be found. Ensure that the assembly containing the type is referenced. If the assembly is part of the current development project, ensure that the project has been built. "

I got a Windows update which rebooted the computer overnight. VS was still running when that happened. When I started it up, it asked to recover some documents (I thought it was odd because I usually always save whatever I'm working on when I quit for the day). I let it recover the documents and VS started up.

I'm trying to go to the forms designer for a couple of forms in the project I'm working on and whichever form I choose, instead of loading up the designer, I get this error message. Where is System.Configuration.ApplicationScopedSettingAttribute and how do I fix this?

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,907 questions
0 comments No comments
{count} votes

Accepted answer
  1. James Buss 136 Reputation points
    2021-07-22T18:22:51.353+00:00

    It looks like it's working again. I was going to implement what @Daniel Zhang-MSFT suggested step by step and check along the way. I got as far as restarting VS and tried it, and it all seems to be working. Thanks Daniel.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,546 Reputation points
    2021-07-21T18:44:47.417+00:00

    Look at the References for the project. Is the System.Configuration namespace there? If not then add it. Right-click References then select Add reference....

    2 people found this answer helpful.

  2. Daniel Zhang-MSFT 9,626 Reputation points
    2021-07-22T07:43:35.827+00:00

    Hi JamesBuss,
    First of all, I suggest you restart or repair your VS to rule out it is caused by VS.
    Then delete and re-add the System.Configuration.ConfigurationManager to your project via following steps
    Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution->Search "System.Configuration.ConfigurationManager"->install it.
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    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.

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.