app.config quot;Could not find schema informationquot; after converting to Visual Studio 2010 / .Net 4.0(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"的架构信息.
- 找不到属性版本"的架构信息.
- 找不到属性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 后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:app.config “找不到架构信息"转换为 Visual Stu
基础教程推荐
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
