Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rebuilding app.config in visual studio?

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>
like image 296
Solorzano Jose Avatar asked Sep 05 '25 17:09

Solorzano Jose


2 Answers

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!

like image 180
HeyThereLameMan Avatar answered Sep 07 '25 13:09

HeyThereLameMan


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

like image 32
Rune Avatar answered Sep 07 '25 11:09

Rune