Skip to content

Commit a3bb765

Browse files
authored
Running Project Templates Locally Documentation (#40127)
1 parent 110c470 commit a3bb765

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ProjectTemplates/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ To build the ProjectTemplates, use one of:
3636

3737
### Test
3838

39+
#### Running ProjectTemplate tests:
40+
3941
To run ProjectTemplate tests, first ensure the ASP.NET localhost development certificate is installed and trusted.
4042
Otherwise, you'll get a test error "Certificate error: Navigation blocked".
4143

@@ -47,6 +49,12 @@ Then, use one of:
4749
1. Run templates manually with `custom-hive` and `disable-sdk-templates` to install to a custom location and turn off the built-in templates e.g.
4850
- `dotnet new -i Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0.6.0.0-dev.nupkg --debug:custom-hive C:\TemplateHive\`
4951
- `dotnet new angular --auth Individual --debug:disable-sdk-templates --debug:custom-hive C:\TemplateHive\`
52+
1. Install the templates to an existing Visual Studio installation.
53+
1. Pack the ProjectTemplates: `src\ProjectTemplates\build.cmd -pack -configuration Release`
54+
- This will produce the `*dev.nupkg` containing the ProjectTemplates at `artifacts\packages\Release\Shipping\Microsoft.DotNet.Web.ProjectTemplates.7.0.7.0.0-dev.nupkg`
55+
2. Install ProjectTemplates in local Visual Studio instance: `dotnet new -i "<REPO_PATH>\artifacts\packages\Release\Shipping\Microsoft.DotNet.Web.ProjectTemplates.7.0.7.0.0-dev.nupkg"`
56+
3. Run Visual Studio and test out templates manually.
57+
4. Uninstall ProjectTemplates from local Visual Studio instance: `dotnet new --uninstall Microsoft.DotNet.Web.ProjectTemplates.7.0`
5058

5159
**Note** ProjectTemplates tests require Visual Studio unless a full build (CI) is performed.
5260

0 commit comments

Comments
 (0)