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.
Visual Studio - Forms designer won't load. Displays the error: "The type 'System.Configuration.ApplicationScopedSettingAttribute' could not be found"
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?
2 additional answers
Sort by: Most helpful
-
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.... -
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.