我使用了第二种解决方案如何解决可以找不到元素/属性
即使用按钮创建了一个 XSD 以创建方案.我将 app.config 中的样式表更改为 app.xsd 但现在我收到警告:
全局元素配置"已在 app.xsd 中声明
即使更改名称也会显示警告.有人对此有解决方案吗?
我遇到了与您提到的问题类似的问题,我按照这些说明进行操作,一切都很好.首先确保 EnterpriseLibrary.Configuration.xsd
在 %ProgramFiles%Microsoft Visual Studio [version]XmlSchemas
中,然后执行以下操作:
Enterprise Library 将架构安装到 Visual Studio 中,该架构提供 IntelliSense® 以在 Visual Studio XML 编辑器中编辑 Enterprise Library 配置文件.您必须先打开架构,然后才能使用它.
<块引用>
启用企业库配置架构
<块引用>
<块引用>
<块引用>
<块引用>
文章的链接是这里 ,希望对您有所帮助
I used the second solution of How to resolve "Could not find schema information for the element/attribute <xxx>"?
I.e. created a XSD with the button to create a scheme. I changed the stylesheet in app.config to app.xsd but now I get the warning:
The Global element 'configuration' has already been declared in app.xsd
Even when changing the name the warning is shown. Does anybody have a solution for this?
I had a similar problem to the question you are referring to, I followed these instructions and everything was fine. Make sure the EnterpriseLibrary.Configuration.xsd
is in %ProgramFiles%Microsoft Visual Studio [version]XmlSchemas
first of all, then do this:
Enterprise Library installs a schema into Visual Studio that provides IntelliSense® for editing Enterprise Library configuration files in the Visual Studio XML editor. You must turn on the schema before you can use it.
To enable the Enterprise Library configuration schema
- Open the configuration file in Visual Studio by double-clicking it in Solution Explorer.
- On the XML menu, click Schemas... to open the XML Schemas dialog.
- Locate the schema named EnterpriseLibrary.Configuration.xsd. This is installed automatically. However, if it is not shown in the list, click Add and navigate to the folder %Program Files%Microsoft Visual Studio [version] XmlSchemas, then select EnterpriseLibrary.Configuration.xsd and click Open.
- Change the value in the Use column to Use this schema. Then click OK.
Link to the article is here , hopes this helps
这篇关于修复:全局元素“配置"已被声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!