重建的app.config在Visual Studio? [英] Rebuilding app.config in visual studio?

查看:442
本文介绍了重建的app.config在Visual Studio?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的app.config是给我与usersettings模式未找到几个消息,所以我与从头开始构建它的意图删除了,但我没有成功。如何建立一个新的基于我的设置文件?每当我提出一个新的和构建解决方案,它不建立应用程序的配置文件。我不知道还有什么尝试。

下面是我的旧文件的麻烦部分:

 <启动>
    < supportedRuntime版本=4.0版的SKU =NETFramework,版本= V4.5/>
< /启动>
< userSettings>
    < D​​elocksNote.Settings1>
        <设定名=字体serializeAs =字符串>
            <价值>的DejaVu三世,20.25pt,风格=斜体< /值GT;
        < /设置>
        <设定名=自动换行serializeAs =字符串>
            <价值>假< /值GT;
        < /设置>
    < /DelocksNote.Settings1>
< / userSettings>
 

解决方案

对于任何人参观的未来......

删除解决方案资源管理器中的app.config文件。右键单击该项目并选择添加,添加新的项目。在列表中找到应用程序配置文件,并添加它。这将是空的。

要生成根据您的设​​置(应该还是在圆通)内容:编辑设置(使空间或东西),并保存。然后去看看你的新的app.config文件。它将被重新建!

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>

解决方案

For anyone visiting in the future...

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 in tact): edit a setting (make a space or something) and save. Then go look at your new app.config file. It will be re-built!

这篇关于重建的app.config在Visual Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆