3
我正在創建一個VS 2013項目模板,您可以添加到它的文件類型之一是一個XML文件,我有XSD但我一直無法弄清楚如何告訴VS當文件被添加時,將模式分配給它。項目項目模板:xml文件類型與XSD /架構
我有這樣的事情。假設模式是Format.XSD,我在projectitem模式中搜索了一些東西,但是找不到任何相關的東西。
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>type.format.ps1xml</DefaultName>
<Name>PowerShell Format File</Name>
<Description>An type format definition</Description>
<ProjectType>PowerShell</ProjectType>
<SortOrder>10</SortOrder>
<Icon>PowerShell.ico</Icon>
</TemplateData>
<TemplateContent>
<References>
</References>
<ProjectItem TargetFileName="$fileinputname$.format.ps1xml" ReplaceParameters="false">format.ps1xml</ProjectItem>
</TemplateContent>
</VSTemplate>
感謝您的回覆。我沒有在一段時間的工作,我不能回憶,如果它實際上是否解決了,我將不得不回到:) – jrich523 2016-05-12 16:03:51
更新的文檔在這裏:https://docs.microsoft.com/en-us/visualstudio/xml-tools/schema-cache – 2017-11-30 10:07:57
感謝@Drew的鏈接更新。基於此,我已經更新了我的答案。 – Vizu 2017-11-30 11:14:41