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
The first walkthrough in this series, [Create a basic project system, part 1](../extensibility/creating-a-basic-project-system-part-1.md), shows how to create a basic project system. This walkthrough builds on the basic project system by adding a Visual Studio template, a property page, and other features. You must complete the first walkthrough before you start this one.
18
18
19
-
This walkthrough teaches how to create a project type that has the project file name extension *.myproj*. To complete the walkthrough, you do not have to create your own language because the walkthrough borrows from the existing Visual C# project system.
19
+
This walkthrough shows how to create a project type that has the project file name extension *.myproj*. To complete the walkthrough, you don't have to create your own language because the walkthrough borrows from the existing Visual C# project system.
20
20
21
21
This walkthrough teaches how to accomplish these tasks:
22
22
@@ -125,7 +125,7 @@ By using a Visual Studio template (*.vstemplate* file) instead of a basic projec
125
125
126
126
3. Set the **Build Action** of this file to **VSCTCompile**. You can do this only in the *.csproj* file, not in the **Properties** window. Make sure that the **Build Action** of this file is set to **None** at this point.
127
127
128
-
1. Right-click the SimpleProject node and then click **Edit SimpleProject.csproj**.
128
+
1. Right-click the SimpleProject node and then select **Edit SimpleProject.csproj**.
129
129
130
130
2. In the *.csproj* file, locate the *SimpleProject.vsct* item.
131
131
@@ -141,20 +141,29 @@ By using a Visual Studio template (*.vstemplate* file) instead of a basic projec
141
141
142
142
4. the project file and close the editor.
143
143
144
-
5. Save the SimpleProject node, and then in the **Solution Explorer** click **Reload Project**.
144
+
5. Save the SimpleProject node, and then in the **Solution Explorer** select **Reload Project**.
145
145
146
146
## Examine the Visual Studio template build steps
147
147
The VSPackage project build system typically runs Visual Studio in setup mode when the *.vstemplate* file is changed or the project that contains the *.vstemplate* file is rebuilt. You can follow along by setting the verbosity level of MSBuild to Normal or higher.
148
148
149
-
1. On the **Tools** menu, click **Options**.
149
+
:::moniker range="visualstudio"
150
150
151
-
2. Expand the **Projects and Solutions** node, and then select **Build and Run**.
151
+
1. In the **Tools** > **Options** pane, expand the **All Settings** > **Projects and Solutions** > **Build and Run** section.
152
152
153
-
3. Set **MSBuild project build output verbosity** to **Normal**. Click **OK**.
153
+
2. Set the **MSBuild project build output verbosity** option to **Normal**.
154
154
155
-
4. Rebuild the SimpleProject project.
155
+
:::moniker-end
156
+
:::moniker range="<=vs-2022"
156
157
157
-
The build step to create the *.zip* project file should resemble the following example.
158
+
1. In the **Tools** > **Options** dialog, expand the **Projects and Solutions** > **Build and Run** section.
159
+
160
+
2. Set the **MSBuild project build output verbosity** option to **Normal**, and select **OK**.
161
+
162
+
:::moniker-end
163
+
164
+
3. Rebuild the SimpleProject project.
165
+
166
+
The build step to create the *.zip* project file should resemble the following example.
158
167
159
168
```
160
169
ZipProjects:
@@ -169,7 +178,7 @@ ZipProjects:
169
178
```
170
179
171
180
## 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*.
181
+
Visual Studio templates don't 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
182
174
183
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
184
@@ -182,7 +191,7 @@ Test your project factory to see whether it creates a project hierarchy by using
182
191
183
192
On later versions of Windows: On the **Start** screen, type **Reset the Microsoft Visual Studio \<version> Experimental Instance**.
184
193
185
-
2. A command prompt window appears. When you see the words **Press any key to continue**, click **ENTER**. After the window closes, open Visual Studio.
194
+
2. A command prompt window appears. When you see the words **Press any key to continue**, select **ENTER**. After the window closes, open Visual Studio.
186
195
187
196
3. Rebuild the SimpleProject project and start debugging. The experimental instance appears.
188
197
@@ -254,11 +263,11 @@ Test the modified project file to see whether the **Console** child node appears
254
263
255
264
2. Rebuild the SimpleProject project and start debugging. The experimental instance should appear
256
265
257
-
3. In the **New Project** dialog, click the **SimpleProject** node. The **Console Application** template should appear in the **Templates** pane.
266
+
3. In the **New Project** dialog, select the **SimpleProject** node. The **Console Application** template should appear in the **Templates** pane.
258
267
259
268
4. Expand the **SimpleProject** node. The **Console** child node should appear. The **SimpleProject Application** template continues to appear in the **Templates** pane.
@@ -311,7 +320,7 @@ When you create a project by using a Visual Studio template in the **New Project
311
320
312
321
5. Create a new SimpleProject Console application. (In the **Project types** pane, select **SimpleProject**. Under **Visual Studio installed templates**, select **Console Application**.)
313
322
314
-
6. In the newly-created project, open *Program.cs*. It should look something like the following (GUID values in your file will differ.):
323
+
6. In the newly-created project, open *Program.cs*. It should look something like the following (GUID values in your file differ.):
315
324
316
325
```csharp
317
326
using System;
@@ -372,7 +381,7 @@ The property page you create in this section lets you alter and save these proje
372
381
}
373
382
```
374
383
375
-
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.
384
+
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 shows only one page.
376
385
377
386
3. Add a class file named *GeneralPropertyPage.cs* to the SimpleProject project.
378
387
@@ -446,7 +455,7 @@ The property page you create in this section lets you alter and save these proje
446
455
}
447
456
```
448
457
449
-
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.
458
+
The `GeneralPropertyPage` class exposes the three public properties AssemblyName, OutputType, and RootNamespace. Because AssemblyName has no set method, it's displayed as a read-only property. OutputType is an enumerated constant, so it appears as dropdown list.
450
459
451
460
The `SettingsPage` base class provides `ProjectMgr` to persist the properties. The `BindProperties` method uses `ProjectMgr` to retrieve the persisted property values and set the corresponding properties. The `ApplyChanges` method uses `ProjectMgr` to get the values of the properties and persist them to the project file. The property set method sets `IsDirty` to true to indicate that the properties have to be persisted. Persistence occurs when you save the project or solution.
452
461
@@ -456,7 +465,7 @@ The property page you create in this section lets you alter and save these proje
456
465
457
466
7. Visual Studio calls your project factory to create a project by using the Visual Studio template. The new *Program.cs* file is opened in the code editor.
458
467
459
-
8. Right-click the project node in **Solution Explorer**, and then click **Properties**. The **Property Pages** dialog box is displayed.
468
+
8. Right-click the project node in **Solution Explorer**, and then select **Properties**. The **Property Pages** dialog box is displayed.
Youshouldseethatthetextinthestatusbarnowreads**Writingtotheprogressbar.**Youshouldalsoseetheprogressbargetupdatedeverysecondfor 20 seconds. After that the status bar and the progress bar are cleared.
103
+
Thetextinthestatusbarnowshows**Writingtotheprogressbar.**Theprogressbarupdateseverysecondfor 20 seconds, and the status and progress bars are cleared.
104
104
105
105
### Display an animation
106
106
107
-
1. The status bar displays a looping animation that indicates either a long-running operation (forexample, buildingmultipleprojectsinasolution). Ifyoudonotseethisanimation, makesureyouhavethecorrect**Tools**>**Options**settings:
107
+
1. The status bar displays a looping animation that indicates either a long-running operation (forexample, buildingmultipleprojectsinasolution). Ifyoudon't see this animation, make sure you have the correct **Tools** > **Options** settings:
0 commit comments