为现有向导创建项目模板 [英] Create a Item Template for a existing wizard

查看:71
本文介绍了为现有向导创建项目模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义的代码生成项" (只是T4模板而不是最终的AddIn Item模板)用于嵌套在其中的ADO.NET实体框架和VS C#Item Template项目.

I have a custom "Code generation Item" (just the T4 Template not the final AddIn Item Template) for the ADO.NET Entity Framework and VS C# Item Template project where it is nested into.

item.vstemplate文件的来源:

Source of the item.vstemplate file:

 

<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
 <TemplateData>
 <DefaultName>Model.tt</DefaultName>
 <Name>Model.tt</Name>
 <Description>No description available</Description>
 <Icon>item.ico</Icon>
 <TemplateID>52981db6-f247-4270-b615-505ec30f8ab0</TemplateID>
 <ProjectType>CSharp</ProjectType>
 <ProvideDefaultName>true</ProvideDefaultName>
 <RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
 <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
 </TemplateData>
 <TemplateContent>
 <References>
 <Reference>
 <Assembly>System.Data.Entity</Assembly>
 </Reference>
 <Reference>
 <Assembly>System</Assembly>
 </Reference>
 <Reference>
 <Assembly>System.Data</Assembly>
 </Reference>
 </References>
 <ProjectItem SubType="" TargetFileName="$fileinputname$.Context.tt" ReplaceParameters="true">Model.Context.tt</ProjectItem>
 <ProjectItem SubType="" TargetFileName="$fileinputname$.tt" ReplaceParameters="true">Model.Types.tt</ProjectItem>
 </TemplateContent>

 <WizardExtension>
 <Assembly>Microsoft.Data.Entity.Design, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
 <FullClassName>Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.AddArtifactGeneratorWizard</FullClassName>
 </WizardExtension>
 
</VSTemplate>

推荐答案

史蒂芬(Steffen),

Hi Steffen ,

请查看本文:

Have a look at this article: How to: Update Existing Templates

希望有帮助!


这篇关于为现有向导创建项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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