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