Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"?

like image 761
PhilHoy Avatar asked Apr 28 '09 09:04

PhilHoy


People also ask

How do you set a building action to an embedded resource?

Click in the solution explorer the file that will be modified. Then hit F4 or click with the right button in the file and then select the "Properties" option. In the Properties window, change Build Action to Embedded Resource. Save this answer.

What does build action content means?

The BuildAction property indicates what Visual Studio does with a file when a build is executed. BuildAction can have one of several values: None - The file is not included in the project output group and is not compiled in the build process. An example is a text file that contains documentation, such as a Readme file.

How do you set a build action?

Set a build action Or, right-click on the file in Solution Explorer and choose Properties. In the Properties window, under the Advanced section, use the drop-down list next to Build Action to set a build action for the file.

How do I create a multi project template?

Create a multi-project template from an existing solutionOn the Project menu, choose Export Template. The Export Template Wizard opens. On the Choose Template Type page, select Project Template. Select one of the projects that you want to export to a template, and then choose Next.


1 Answers

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)

like image 109
Weiming Avatar answered Oct 04 '22 02:10

Weiming