Visual Studio Templates - adding additional pre-existing projects
Posted
by Bob Palmer
on Stack Overflow
See other posts from Stack Overflow
or by Bob Palmer
Published on 2010-01-07T21:41:38Z
Indexed on
2010/03/25
1:03 UTC
Read the original article
Hit count: 752
Hey all,
I'm working on a Visual Studio template where the generated project relies on a number of references, which happen to be other projects under source control.
The question is how do I set this up in my ProjectGroup template? For example, if I have an already existing project at "C:\Stuff\MyUtilityProject\Utility.csproj" with a single file (Tools.cs) that I want to add to my template, how would I go about this?
Here's what my vstempalte looks like. FYI - I am having no issues with the ProjectTemplateLink or creation of the Solution folder, just in adding the pre-existing Utility.csproj to my new solution:
Thanks in advance!
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="ProjectGroup">
<TemplateData>
<Name>MySampleSolution</Name>
<Description>My Test Project</Description>
<ProjectType>CSharp</ProjectType>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="Content">
<Project File="C:\Stuff\MyUtilityProject\Utility.csproj">
<ProjectItem>Tools.cs</ProjectItem>
</Project>
</SolutionFolder>
<ProjectTemplateLink ProjectName="MyWorkingTemplate">
MyWorkingTemplate\MyTemplate.vstemplate
</ProjectTemplateLink>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
© Stack Overflow or respective owner