問題描述
我使用了第二種解決方案如何解決可以找不到元素/屬性
即使用按鈕創(chuàng)建了一個 XSD 以創(chuàng)建方案.我將 app.config 中的樣式表更改為 app.xsd 但現(xiàn)在我收到警告:
全局元素配置"已在 app.xsd 中聲明
即使更改名稱也會顯示警告.有人對此有解決方案嗎?
我遇到了與您提到的問題類似的問題,我按照這些說明進行操作,一切都很好.首先確保 EnterpriseLibrary.Configuration.xsd
在 %ProgramFiles%Microsoft Visual Studio [version]XmlSchemas
中,然后執(zhí)行以下操作:
Enterprise Library 將架構安裝到 Visual Studio 中,該架構提供 IntelliSense? 以在 Visual Studio XML 編輯器中編輯 Enterprise Library 配置文件.您必須先打開架構,然后才能使用它.
<塊引用>
啟用企業(yè)庫配置架構
<塊引用>
- 在解決方案資源管理器中雙擊配置文件,在 Visual Studio 中打開它.
<塊引用>
- 在 XML 菜單上,單擊 Schemas... 打開 XML Schemas 對話框.
<塊引用>
- 找到名為 EnterpriseLibrary.Configuration.xsd 的架構.這是自動安裝的.但是,如果它未顯示在列表中,請單擊添加并導航到文件夾 %Program Files%Microsoft Visual Studio [version] XmlSchemas,然后選擇 EnterpriseLibrary.Configuration.xsd 并單擊打開.
<塊引用>
- 將使用列中的值更改為使用此架構.然后點擊確定.
文章的鏈接是這里 ,希望對您有所幫助
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模板網(wǎng)!