PhilHoy
PhilHoy

Reputation: 1613

VSTemplate with build action

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

Upvotes: 6

Views: 2276

Answers (3)

Weiming
Weiming

Reputation: 958

According to this post, instead of specifying SubType, you should specify the ItemType attribute to 'Content'.

<ProjectItem ItemType="Content" ... > ... </ProjectItem>

I tried it and it works! (and yes, it's not very intuitive)

Upvotes: 3

Jared
Jared

Reputation: 8610

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.

Upvotes: 0

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

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

Upvotes: 0

Related Questions