views:

336

answers:

4

How do you create a VSTemplate so that it automatically sets the build action as "content" not the default which is "none"?

A: 

Have you tried setting the SubType attribute of the ProjectItem to Content?

Shay Erlichmen
A: 

that does not seem to have helped my template looks like this:

<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
      <TemplateData>
        <DefaultName>SparkFileName.Spark</DefaultName>
        <Name>Happy</Name>
        <Description>Spark file</Description>
        <ProjectType>VisualBasic</ProjectType>
        <SortOrder>10</SortOrder>
        <Icon>__TemplateIcon.ico</Icon>
      </TemplateData>
      <TemplateContent>
        <References>

        </References>
        <ProjectItem SubType="Content" TargetFileName="$fileinputname$.Spark"  ReplaceParameters="true">Spark.Spark</ProjectItem>
      </TemplateContent>
    </VSTemplate>
PhilHoy
A: 

I am also interested in the solution.

A: 

it doesn't look like this can be done from the .vstemplate file, however it looks like you can user .pkgdef file to accomplish what you want.

Jared