修正:全球元素“配置”已经声明 [英] Fix: The Global element 'configuration' has already been declared

查看:684
本文介绍了修正:全球元素“配置”已经声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用
如何解决"无法找到元素/属性<模式信息; XXX>"?



即创建了XSD的按钮创建一个方案。我改变了样式表的app.config到app.xsd,但现在我得到警告:



全局元素配置已经在app.xsd 改变显示警告的名字

甚至当。
是否有人有一个解决方案?


解决方案

我也有类似的问题你指的这个问题,我跟着这些指示,一切都很好。确保 EnterpriseLibrary.Configuration.xsd %Program Files文件%\Microsoft的Visual Studio [版] \Xml\Schemas\ 首先,那么这样做:




企业库安装了一个模式到Visual Studio提供的IntelliSense®编辑在Visual Studio XML编辑器企业库的配置文件。您必须打开,然后才能使用它的架构。



要启用企业库配置模式




  1. 双击它,在解决方案资源管理器打开Visual Studio中的配置文件。


  2. 在XML菜单上,单击架构...打开XML架构对话框。


  3. 找到名为EnterpriseLibrary.Configuration.xsd的模式。这是自动安装。但是,如果在列表中没有显示,单击添加并导航到文件夹%Program Files文件%\Microsoft的Visual Studio [版] \Xml\Schemas\,然后选择EnterpriseLibrary.Configuration.xsd并单击打开。


  4. 在使用列的值更改为使用此模式。然后单击确定。





链接到文章的>,希望这有助于


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 %Program Files%\Microsoft Visual Studio [version] \Xml\Schemas\ 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

  1. Open the configuration file in Visual Studio by double-clicking it in Solution Explorer.

  2. On the XML menu, click Schemas... to open the XML Schemas dialog.

  3. 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] \Xml\Schemas\, then select EnterpriseLibrary.Configuration.xsd and click Open.

  4. Change the value in the Use column to Use this schema. Then click OK.

Link to the article is here , hopes this helps

这篇关于修正:全球元素“配置”已经声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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