app.config“找不到架构信息”;转换为Visual Studio 2010 / .Net 4.0之后 [英] app.config "Could not find schema information" after converting to Visual Studio 2010 / .Net 4.0

查看:490
本文介绍了app.config“找不到架构信息”;转换为Visual Studio 2010 / .Net 4.0之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

After upgrading my project to Visual Studio 2010 and .Net 4.0, my app.config file generates these messages upon building the project:


  • 找不到元素'supportedRuntime'的架构信息。

  • 找不到属性'version'的架构信息。

  • 找不到属性'sku'的模式信息。

这是我的整个app.config文件:

Here is my entire app.config file:

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
  </startup>
</configuration>

如果我创建一个新的VS2010项目并从字面上复制/粘贴相同的app.config文件,则会收到没有此类消息。

If I create a new VS2010 project and literally copy/paste the same app.config file, I receive no such messages.

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

Obviously these messages are not causing any runtime problems, but they are still annoying and disconcerting.

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

How do I fix whatever problem is making these messages appear?

我在app.config configSections自定义设置找不到架构信息,但我在属性列表中看不到输入路径的任何地方

I see the answer at app.config configSections custom settings can not find schema information, but I see nowhere in the properties list to enter the path to the schema.

谢谢。

推荐答案

我更改了模式从DotNetConfig到DotNetConfig35,它解决了这个问题。可以在app.config文件的属性中找到。

I changed the schema from DotNetConfig to DotNetConfig35 and it took care of the issue. This is available in the properties of the app.config file.

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

Right clicking the app.config file in solution explorer gives the properties of the file, right clicking in the edit window of the app.config file itself gives the properties of the XML document.

这篇关于app.config“找不到架构信息”;转换为Visual Studio 2010 / .Net 4.0之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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