gpt4 book ai didi

.net - 转换为 Visual Studio 2010/.Net 4.0 后的 app.config "Could not find schema information"

转载 作者:行者123 更新时间:2023-12-03 10:17:04 24 4
gpt4 key购买 nike

将我的项目升级到 Visual Studio 2010 和 .Net 4.0 后,我的 app.config 文件在构建项目时生成以下消息:

  • 找不到元素“supportedRuntime”的架构信息。
  • 找不到属性“版本”的架构信息。
  • 找不到属性“sku”的架构信息。

  • 这是我的整个 app.config 文件:
    <?xml version="1.0"?>
    <configuration>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
    </startup>
    </configuration>

    如果我创建一个新的 VS2010 项目并逐字复制/粘贴相同的 app.config 文件,我将不会收到此类消息。

    显然,这些消息不会导致任何运行时问题,但它们仍然令人烦恼和不安。

    如何解决使这些消息出现的任何问题?

    我在 app.config configSections custom settings can not find schema information 看到答案,但我在属性列表中看不到任何地方可以输入架构的路径。

    谢谢。

    最佳答案

    我将架构从 DotNetConfig 更改为 DotNetConfig35,它解决了这个问题。这在 app.config 文件的属性中可用。

    在解决方案资源管理器中右键单击 app.config 文件可提供该文件的属性,在 app.config 文件本身的编辑窗口中右键单击可提供 XML 文档的属性。

    关于.net - 转换为 Visual Studio 2010/.Net 4.0 后的 app.config "Could not find schema information",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3173733/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com