diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index 225cad1072d97..285c5abb30a31 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -1707,6 +1707,10 @@ "source_path_from_root": "/docs/core/tools/csproj.md", "redirect_url": "/dotnet/core/project-sdk/msbuild-props" }, + { + "source_path_from_root": "/docs/core/tools/custom-templates.md", + "redirect_url": "/dotnet/core/tools/templates" + }, { "source_path_from_root": "/docs/core/tools/dotnet-add-package.md", "redirect_url": "/dotnet/core/tools/dotnet-package-add" diff --git a/docs/core/tools/custom-templates.md b/docs/core/tools/custom-templates.md deleted file mode 100644 index 8d9b73a116d18..0000000000000 --- a/docs/core/tools/custom-templates.md +++ /dev/null @@ -1,325 +0,0 @@ ---- -title: Custom templates for dotnet new -description: Learn about custom templates for any type of .NET project or files. -author: adegeo -ms.date: 05/20/2020 ---- - -# Custom templates for dotnet new - -The [.NET SDK](https://dotnet.microsoft.com/download) comes with many templates already installed and ready for you to use. The [`dotnet new` command](dotnet-new.md) isn't only the way to use a template, but also how to install and uninstall templates. You can create your own custom templates for any type of project, such as an app, service, tool, or class library. You can even create a template that outputs one or more independent files, such as a configuration file. - -You can install custom templates from a NuGet package on any NuGet feed, by referencing a NuGet *.nupkg* file directly, or by specifying a file system directory that contains the template. The template engine offers features that allow you to replace values, include and exclude files, and execute custom processing operations when your template is used. - -The template engine is open source, and the online code repository is at [dotnet/templating](https://github.com/dotnet/templating/) on GitHub. More templates, including templates from third parties, can be found using [`dotnet new search`](dotnet-new-search.md). For more information about creating and using custom templates, see [How to create your own templates for dotnet new](https://devblogs.microsoft.com/dotnet/how-to-create-your-own-templates-for-dotnet-new/) and the [dotnet/templating GitHub repo Wiki](https://github.com/dotnet/templating/wiki). - -> [!NOTE] -> Template examples are available at the [dotnet/templating](https://aka.ms/template-samples) GitHub repository. - -To follow a walkthrough and create a template, see the [Create a custom template for dotnet new](../tutorials/cli-templates-create-item-template.md) tutorial. - -## .NET default templates - -When you install the [.NET SDK](https://dotnet.microsoft.com/download), you receive over a dozen built-in templates for creating projects and files, including console apps, class libraries, unit test projects, ASP.NET Core apps (including [Angular](https://angular.io/) and [React](https://reactjs.org/) projects), and configuration files. To list the built-in templates, run the `dotnet new list` command: - -```dotnetcli -dotnet new list -``` - -## Configuration - -A template is composed of the following parts: - -- Source files and folders. -- A configuration file (*template.json*). - -### Source files and folders - -The source files and folders include whatever files and folders you want the template engine to use when the `dotnet new