Reputation: 632
My app.config was giving me several messages related to "usersettings schema not found", so I deleted it with the intention of building it from scratch, but I was not successful. How can I build a new one based on my settings file? Whenever I make a new one and build the solution, it doesn't build the app config file. I don't know what else to try.
Here's the troublesome part of my old file:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<userSettings>
<DelocksNote.Settings1>
<setting name="Font" serializeAs="String">
<value>DejaVu Sans, 20.25pt, style=Italic</value>
</setting>
<setting name="WordWrap" serializeAs="String">
<value>False</value>
</setting>
</DelocksNote.Settings1>
</userSettings>
Upvotes: 30
Views: 41631
Reputation: 916
Delete the app.config
file in your solution explorer. Right click the project and select add, add new item. Find "Application Configuration File" in the list and add it. It will be empty.
To generate the contents based on your settings (which should still be intact): edit a setting (make a space or something) and save. Then go look at your new app.config
file. It will be re-built!
Upvotes: 75
Reputation: 832
In Package Manager Console, run this:
Get-Project –All | Add-BindingRedirect
https://weblog.west-wind.com/posts/2014/nov/29/updating-assembly-redirects-with-nuget
Upvotes: 3