-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred while saving values to the app.config file #8207
Comments
I also have this problem, reproducible in the exact same way as described. |
@mairaw Thank you for looking into the bug. |
I have this problem also. Thanks to @帕菲菲 for the workaround (which I've not had time to try yet). Surely things like this should work 'out of the box' without users having to work out manual intervention for themselves. VS is a tool for use, and has been around for years. I agree with @mairaw that it needs to be fixed - but how and when? I've now tried the workaround exactly as described, and get into an even worse state. When accessing the setting I get an error; I've had this error before - it seems that errors thrown by incorrect VS-generated files also screw up the diagnostics reporting. I've a nasty feeling that we're getting back to the good old (?) days of programming - back in the 1960s IBM found that for each bug they eliminated they introduced 1.2! |
@timheuer can you help route this to the appropriate place? This was moved from the developer community site to the repo, but if this is a designer issue, maybe the original ticket should be reopened? |
Related #6784 |
It does not repro "An error occurred while saving values to the app.config file..." taking into consideration Tested in: This was tested in VB and C#
|
This issue has been moved from a ticket on Developer Community.
The application settings designer is no longer able to update the App.config file. This goes back several versions of VS before current.
Steps to reproduce:
Expected results:
Actual result:
The settings designer does update the App.config at first but any subsequent updates will result in the aforementioned error.
Original Comments
Feedback Bot on 6/27/2020, 08:11 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Sam Harwell [MSFT] on 7/6/2020, 04:44 PM:
Thank you for providing feedback, and we’re sorry to hear it’s not behaving as you expect. Based on your description so far, it sounds like you are experiencing a problem which is historically hard to diagnose and resolve using the normal “steps to reproduce”. We created a set of instructions for providing additional information which will help us track down the true source of the problems.
Based on the information provided so far, the most likely scenario to follow is for “Performance issues”. Please look at the following document to provide the feedback most relevant for the problems you would like to see fixed: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-increase-chances-of-performance-issue-being-fixed?view=vs-2019#slowness-and-high-cpu-issues
Feedback Bot on 7/14/2020, 09:43 PM:
We will close this report in 14 days because we don’t have enough information to investigate further. To keep the problem open, please provide the requested details.
Sala, Bojan on 7/17/2020, 04:05 AM:
Hi Sam, I am not sure what information I need to provide. I can attach an example solution for you if that would help?
It's extremely easy to reproduce the bug, it seems to simply be an issue where developers overlooked a scenario where one would prefer using App.config file in a .Net Core app.
Feedback Bot on 7/20/2020, 08:22 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Feedback Bot on 9/23/2020, 11:31 PM:
I have detected that for the last 90 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.
Robert Howell on 2/1/2021, 06:37 AM:
I also have the identical problem. I am using .NetCore 3.1 with Wpf. I can added the first setting fine, but subsequent settings seem to add but when I click Save I get the error above and the app.config file is not updated. Only the first entry appears
Vernon Martin on 2/21/2021, 03:25 AM:
(private comment, text removed)
Vernon Martin on 2/21/2021, 03:35 AM:
(private comment, text removed)
Vernon Martin on 2/21/2021, 05:03 AM:
I have the same issue.
My work around: initial creating of Setting.settings is no issue. Add a setting or two. Saved. Committed to source code control for safe keeping. When the error occurs, I close my settings and revert to previously working copies of settings and app.config. Then I add my new settings (or remove or modify) manually in app.config file, then open Setting.settings and allow it to add the new setting. then I save settings and ignore the error message about in invalid XML. Life goes on with no noticeable consequences.
Vernon Martin on 3/15/2021, 00:51 PM:
It seems if you do that, you’d loose other settings in the APP.config file. Is that true?
Original Solutions
帕菲菲 solved on 3/12/2021, 05:01 AM, 0 votes:
[Workaround]
Still not fixed until this post.
Fortunately, the settings are not basically saved in App.config. It’s actually saved in “My Project\Settings.settings”. App.config just contains an uncritical copy. Based on this, the workaround is:
The text was updated successfully, but these errors were encountered: