Reputation: 2838
I have a bunch of property settings saved in an application (WinForms btw, I have never touched WPF) in a project, and I'm re-writing that project again due to messy coding. The problem is, there are around 50 settings (the settings which you can see from Project Properties and the Settings option) in that project and I don't know how to copy them to the new project. Is there a way to do this or will I have to add them all over again?
Upvotes: 1
Views: 3804
Reputation: 21
Upvotes: 2
Reputation: 9766
In the Solution Explorer open $MyPojectName\Properties\Settings.settings with XML Editor (use Open With... context menu option) and copy them where you want.
And if you want to override another project's settings file be ready to renew root element's GeneratedClassNamespace attribute.
Upvotes: 3
Reputation: 26690
The settings are saved in two settings files (settings.settings and settings.designer.cs)
You can just copy these files to your new project and overwrite the empty ones with the ones from the previous project.
You might need to edit the files before copying them to make sure the namespace matches the namespace on the new project.
Upvotes: 4