You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. In the **Properties** window, select all five files in the *\\Templates\Projects\SimpleProject\\* folder and set the **Build Action** to **ZipProject**.
The \<TemplateData> section determines the location and appearance of the SimpleProject project type in the **New Project** dialog box, as follows:
84
+
The \<TemplateData> section determines the location and appearance of the SimpleProject project type in the **New Project** dialog box, as follows:
85
85
86
86
- The \<Name> element names the project template to be SimpleProject Application.
87
87
@@ -154,7 +154,7 @@ By using a Visual Studio template (*.vstemplate* file) instead of a basic projec
154
154
155
155
4. Rebuild the SimpleProject project.
156
156
157
-
The build step to create the *.zip* project file should resemble the following example.
157
+
The build step to create the *.zip* project file should resemble the following example.
158
158
159
159
```
160
160
ZipProjects:
@@ -169,12 +169,12 @@ ZipProjects:
169
169
```
170
170
171
171
## Deploy a Visual Studio template
172
-
Visual Studio templates do not contain path information. Therefore, the template *.zip* file must be deployed to a location that is known to Visual Studio. The location of the ProjectTemplates folder is typically *<%LOCALAPPDATA%>\Microsoft\VisualStudio\14.0Exp\ProjectTemplates*.
172
+
Visual Studio templates do not contain path information. Therefore, the template *.zip* file must be deployed to a location that is known to Visual Studio. The location of the ProjectTemplates folder is typically *<%LOCALAPPDATA%>\Microsoft\VisualStudio\14.0Exp\ProjectTemplates*.
173
173
174
-
To deploy your project factory, the installation program must have administrator privileges. It deploys templates under the Visual Studio installation node: *...\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates*.
174
+
To deploy your project factory, the installation program must have administrator privileges. It deploys templates under the Visual Studio installation node: *...\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates*.
175
175
176
176
## Test a Visual Studio template
177
-
Test your project factory to see whether it creates a project hierarchy by using the Visual Studio template.
177
+
Test your project factory to see whether it creates a project hierarchy by using the Visual Studio template.
178
178
179
179
1. Reset the Visual Studio SDK experimental instance.
180
180
@@ -190,16 +190,16 @@ ZipProjects:
190
190
191
191
5. You should see a new instance of SimpleProject.
192
192
193
-

193
+

194
194
195
-

195
+

196
196
197
197
## Create a project type child node
198
-
You can add a child node to a project type node in the **New Project** dialog box. For example, for the SimpleProject project type, you could have child nodes for console applications, window applications, web applications, and so on.
198
+
You can add a child node to a project type node in the **New Project** dialog box. For example, for the SimpleProject project type, you could have child nodes for console applications, window applications, web applications, and so on.
199
199
200
-
Child nodes are created by altering the project file and adding \<OutputSubPath> children to the \<ZipProject> elements. When a template is copied during build or deployment, every child node becomes a subfolder of the project templates folder.
200
+
Child nodes are created by altering the project file and adding \<OutputSubPath> children to the \<ZipProject> elements. When a template is copied during build or deployment, every child node becomes a subfolder of the project templates folder.
201
201
202
-
This section shows how to create a Console child node for the SimpleProject project type.
202
+
This section shows how to create a Console child node for the SimpleProject project type.
203
203
204
204
1. Rename the *\\Templates\Projects\SimpleProject\\* folder to *\\Templates\Projects\ConsoleApp\\*.
[Creating a basic project system, part 1](../extensibility/creating-a-basic-project-system-part-1.md) showed how to overwrite the `ProjectNode.AddFileFromTemplate` method to do a basic kind of template parameter substitution. This section teaches how to use the more sophisticated Visual Studio template parameters.
@@ -348,110 +348,103 @@ The property page you create in this section lets you alter and save these proje
348
348
349
349
1. In the *SimpleProjectPackage.cs* file, add this `ProvideObject` attribute to the `SimpleProjectPackage` class:
350
350
351
-
```
352
-
[ProvideObject(typeof(GeneralPropertyPage))]
353
-
public sealed class SimpleProjectPackage : ProjectPackage
354
-
```
351
+
```
352
+
[ProvideObject(typeof(GeneralPropertyPage))]
353
+
public sealed class SimpleProjectPackage : ProjectPackage
354
+
```
355
355
356
356
This registers the property page class `GeneralPropertyPage` with COM.
357
357
358
358
2. In the *SimpleProjectNode.cs* file, add these two overridden methods to the `SimpleProjectNode` class:
Both of these methods return an array of property page GUIDs. The GeneralPropertyPage GUID is the only element in the array, so the **Property Pages** dialog box will show only one page.
376
376
377
377
3. Add a class file named *GeneralPropertyPage.cs* to the SimpleProject project.
378
378
379
379
4. Replace the contents of this file by using the following code:
The `GeneralPropertyPage` class exposes the three public properties AssemblyName, OutputType, and RootNamespace. Because AssemblyName has no set method, it is displayed as a read-only property. OutputType is an enumerated constant, so it appears as dropdown list.
457
450
@@ -465,7 +458,7 @@ The property page you create in this section lets you alter and save these proje
465
458
466
459
8. Right-click the project node in **Solution Explorer**, and then click **Properties**. The **Property Pages** dialog box is displayed.
0 commit comments