diff --git a/Directory.Build.props b/Directory.Build.props index 68acae33ded..ae45e4f5aca 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -25,8 +25,7 @@ $(RepoRoot)tools\ $(RepoRoot).tools\ $(RepoRoot)localize\ - $(ArtifactsDir)templates\ - $(ArtifactsDir)templates-notimestamp\ + $(RepoRoot)template_feed\ $(RepoRoot)src\ $(RepoRoot)test\ MicrosoftAspNetCore diff --git a/Microsoft.TemplateEngine.sln b/Microsoft.TemplateEngine.sln index 392461e372a..7c5bf7aa80b 100644 --- a/Microsoft.TemplateEngine.sln +++ b/Microsoft.TemplateEngine.sln @@ -106,6 +106,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "template-samples", "templat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Samples", "dotnet-template-samples\Microsoft.TemplateEngine.Samples.csproj", "{DFB06A25-719F-4C8B-B84D-55D2D601BEF6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "template-feed", "template-feed", "{FF433F83-22C2-46E0-99B3-4FFCA5190A94}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Authoring.Templates", "template_feed\Microsoft.TemplateEngine.Authoring.Templates\Microsoft.TemplateEngine.Authoring.Templates.csproj", "{1F74F8F5-99E4-47AE-8608-6D470325E81C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests", "test\Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests\Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests.csproj", "{8651DEEB-0291-4E49-92AA-3B097DAF9D37}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -500,6 +506,30 @@ Global {DFB06A25-719F-4C8B-B84D-55D2D601BEF6}.Release|x64.Build.0 = Release|Any CPU {DFB06A25-719F-4C8B-B84D-55D2D601BEF6}.Release|x86.ActiveCfg = Release|Any CPU {DFB06A25-719F-4C8B-B84D-55D2D601BEF6}.Release|x86.Build.0 = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|x64.ActiveCfg = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|x64.Build.0 = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|x86.ActiveCfg = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Debug|x86.Build.0 = Debug|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|Any CPU.Build.0 = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|x64.ActiveCfg = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|x64.Build.0 = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|x86.ActiveCfg = Release|Any CPU + {1F74F8F5-99E4-47AE-8608-6D470325E81C}.Release|x86.Build.0 = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|x64.ActiveCfg = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|x64.Build.0 = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|x86.ActiveCfg = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Debug|x86.Build.0 = Debug|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|Any CPU.Build.0 = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|x64.ActiveCfg = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|x64.Build.0 = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|x86.ActiveCfg = Release|Any CPU + {8651DEEB-0291-4E49-92AA-3B097DAF9D37}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -540,6 +570,8 @@ Global {EE8CD472-D8C4-4CD0-BC84-6C305F5971AE} = {43053BC4-32B4-4404-B62D-410F367CE0CE} {449B9DDA-F18C-411E-9A74-3930652BB78A} = {B794BF86-4185-4DCE-AC86-C27D5D966B9B} {DFB06A25-719F-4C8B-B84D-55D2D601BEF6} = {3A2D12C2-0455-4471-9EBB-91749BA3A60F} + {1F74F8F5-99E4-47AE-8608-6D470325E81C} = {FF433F83-22C2-46E0-99B3-4FFCA5190A94} + {8651DEEB-0291-4E49-92AA-3B097DAF9D37} = {8B498D0C-F488-4B38-8A7D-B20BF9DB6F60} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6EA1A508-6033-4538-BF98-7F71B4E297AD} diff --git a/docs/Reference-for-template.json.md b/docs/Reference-for-template.json.md index f9786f64751..390887bc22d 100644 --- a/docs/Reference-for-template.json.md +++ b/docs/Reference-for-template.json.md @@ -35,7 +35,7 @@ A tutorial on how to create the template package can be find [here](https://lear |---|---|---| |`identity`|A unique name for this template|yes| |`author`|The author of the template|no| -|`classifications`|Zero or more characteristics of the template which may be used in search. In this field you define the values shown as Tags in `dotnet new`|no| +|`classifications`| Zero or more characteristics of the template which are shown in the tabular output of `dotnet new list` and `dotnet new search` as "Tags". It is possible to filter the templates based on them using `--tag` option. In Visual Studio those items are shown in New Project Dialog in the available list of templates together with template name, description and language. Common classifications are: `Library`, `Test`, `Web` etc. |no| |`name`|The name for the template. This is displayed as the template name when using `dotnet new` and Visual Studio.|yes| |`groupIdentity`|The ID of the group this template belongs to. This allows multiple templates to be displayed as one, with the the decision for which one to use based on the template options. |no| |`tags`|You can use tags to improve the metadata of your project. Well-known tags are: `language` and `type`. To specify the template language, use the tag `language`. To specify the template type, use the tag `type`. Supported types are: `project`, `item`, `solution`.|no| diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/Microsoft.TemplateEngine.Authoring.Templates.csproj b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/Microsoft.TemplateEngine.Authoring.Templates.csproj new file mode 100644 index 00000000000..61e9bb8b289 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/Microsoft.TemplateEngine.Authoring.Templates.csproj @@ -0,0 +1,39 @@ + + + $(NETCoreTargetFramework) + False + False + False + $(ArtifactsTmpDir) + False + true + true + true + true + 2008;NU5105 + true + Microsoft.TemplateEngine.Authoring.Templates + Microsoft + The templates for useful items and projects for template authoring. + en-US + https://github.com/dotnet/templating + Template + True + true + + + + + content + + + + + + + + + + + + diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/README.md b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/README.md new file mode 100644 index 00000000000..c67306cee7a --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/README.md @@ -0,0 +1,10 @@ +## The templates for template authoring + +The package contains the templates useful for the template authoring: +| Template name | Short name | Description| +|---|---|---| +|`template.json` configuration file|`template.json`|A template for template.json configuration file for .NET template.| +|Template Package|`template-package`|A project for creating template package containing .NET templates.| + +The package is available for download from nuget.org. +Please feel to contribute or provide the feedback in discussions or via opening the issue in dotnet/templating repo. diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/dotnetcli.host.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/dotnetcli.host.json new file mode 100644 index 00000000000..adb957225fa --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/dotnetcli.host.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "CreateTemplateConfigFolder": { + "longName": "create-template-config-folder", + "shortName": "" + }, + "TemplateName": { + "longName": "template-name", + "shortName": "tn" + }, + "TemplateShortName": { + "longName": "short-name", + "shortName": "sn" + }, + "TemplateIdentity": { + "longName": "template-identity", + "shortName": "ti" + } + } +} diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.cs.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.de.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.de.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.en.json new file mode 100644 index 00000000000..d1727507ff0 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.en.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json configuration file", + "description": "A template for template.json configuration file for .NET template. See https://github.com/dotnet/templating/wiki/Reference-for-template.json for complete configuration description", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.es.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.es.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.fr.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.it.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.it.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ja.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ko.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pl.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ru.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.tr.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 00000000000..8fad34c4c10 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,15 @@ +{ + "author": "Microsoft", + "name": "template.json", + "description": "A template for template.json configuration file for .NET template.", + "symbols/CreateTemplateConfigFolder/description": "True when template.json should be created in .template.config folder.", + "symbols/CreateTemplateConfigFolder/displayName": "Create .template.config folder", + "symbols/TemplateName/description": "The template name.", + "symbols/TemplateName/displayName": "Template name", + "symbols/TemplateShortName/description": "The template short name.", + "symbols/TemplateShortName/displayName": "Template short name", + "symbols/TemplateIdentity/description": "The template identity (should be unique).", + "symbols/TemplateIdentity/displayName": "Template identity", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open template.json in the editor and complete the configuration." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/template.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/template.json new file mode 100644 index 00000000000..d1594f23a2f --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/.template.config/template.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ + "Template Authoring" + ], + "name": "template.json configuration file", + "generatorVersions": "[1.0.0.0-*)", + "description": "A template for template.json configuration file for .NET template. See https://github.com/dotnet/templating/wiki/Reference-for-template.json for complete configuration description", + "groupIdentity": "Microsoft.TemplateEngine.Authoring.TemplateJson", + "precedence": "0", + "identity": "Microsoft.TemplateEngine.Authoring.TemplateJson.1.0", + "shortName": "template.json", + "tags": { + "language": "JSON", + "type": "item" + }, + "symbols": { + "CreateTemplateConfigFolder": { + "type": "parameter", + "datatype": "bool", + "description": "True when template.json should be created in .template.config folder.", + "defaultValue": "true", + "displayName": "Create .template.config folder" + }, + "TemplateName": { + "type": "parameter", + "datatype": "string", + "description": "The template name.", + "defaultValue": "New Template", + "replaces": "New Template", + "displayName": "Template name" + }, + "TemplateShortName": { + "type": "parameter", + "datatype": "string", + "description": "The template short name.", + "defaultValue": "new-template", + "replaces": "new-template", + "displayName": "Template short name" + }, + "TemplateIdentity": { + "type": "parameter", + "datatype": "string", + "description": "The template identity (should be unique).", + "defaultValue": "New.Template.Identity", + "replaces": "New.Template.Identity", + "displayName": "Template identity" + } + }, + "sources": [ + { + "condition": "CreateTemplateConfigFolder == true", + "target": ".template.config/" + }, + { + "condition": "CreateTemplateConfigFolder == false", + "target": "./" + } + ], + "primaryOutputs": [ + { + "condition": "CreateTemplateConfigFolder == true", + "path": ".template.config/template.json" + }, + { + "condition": "CreateTemplateConfigFolder != true", + "path": "template.json" + } + ], + "postActions": [ + { + "id": "instructions", + "description": "Manual actions required", + "manualInstructions": [ + { + "text": "Open template.json in the editor and complete the configuration." + } + ], + "actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C", + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/template.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/template.json new file mode 100644 index 00000000000..eb638e57305 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplateJson/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json.schemastore.org/template", + "$comment": "See https://aka.ms/template-json-reference for complete configuration description. Complete TODOs below and remove the $comment properties. It is recommended to use the JSON editor that supports schema hints to get more information about defined JSON properties and their description.", + "author": "TODO: fill author name here.", + "classifications": [ + "TODO: fill classification here. Common classifications are: Library, Test, Web etc. Each classification should be a separate element of the array. For more details, see https://aka.ms/template-json-reference#classifications." + ], + "name": "New Template", + "description": "TODO: fill the template description here.", + "precedence": "0", + "identity": "New.Template.Identity", + "shortName": "new-template", + "tags": { + "$comment": "TODO: fill the language and type below. Common types are: project, item, solution.", + "language": "C#", + "type": "project" + }, + "$comment_sourceName": "TODO: Source name should follow these rules: https://aka.ms/template-json-source-name. Source name may be removed if replacement for name is not required.", + "sourceName": "New.Template.1", + "preferNameDirectory": true, + "symbols": { + "ExampleParameter": { + "$comment": "TODO: The symbols section defines variables and their values. For more details, see https://aka.ms/template-json-reference#symbols.", + "type": "parameter", + "datatype": "string", + "defaultValue": "example", + "replaces": "valueToReplace", + "isEnabled": false + } + }, + "sources": [ + { + "$comment": "TODO: Sources control the paths for source and target content. For more details see https://aka.ms/template-json-reference#symbols#source-definition. If source definition is not required, remove the property.", + "condition": "false", + "source": "./source-files", + "target": "./target" + } + ], + "constraints": { + "SampleConstraint": { + "$comment": "TODO: The template may define the constraints all of which must be met in order for the template to be used. For more details see https://aka.ms/template-json-reference#symbols#template-constraints. If constraints are not required, remove the property.", + "type": "os", + "args": [ "Linux", "OSX", "Windows" ] + } + }, + "primaryOutputs": [ + { + "$comment": "TODO: Primary outputs define the list of template files for further processing, usually post actions. If primary outputs are not required, remove the property.", + "path": "New.Template.1.cs", + "condition": "false" + } + ], + "postActions": [ + { + "$comment": "TODO: Enables actions to be performed after the project is created. For more details see https://aka.ms/template-json-post-actions. If post actions are not required, remove the property.", + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "condition": "false", + "id": "sample-post-action", + "manualInstructions": [ + { + "text": "Open file in New.Template.1.cs in the editor." + } + ], + "args": { + "files": "0" + } + } + ] +} diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/dotnetcli.host.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/dotnetcli.host.json new file mode 100644 index 00000000000..17930d81b4f --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "langVersion": { + "longName": "langVersion", + "shortName": "" + } + }, + "usageExamples": [ + "--framework net7.0" + ] +} diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.cs.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.de.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.de.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.en.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.en.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.es.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.es.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.fr.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.it.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.it.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ja.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ko.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pl.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ru.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.tr.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 00000000000..dfc74ac6792 --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Template Package", + "description": "A project for a template package containing .NET templates.", + "postActions/instructions/description": "Manual actions required", + "postActions/instructions/manualInstructions/default/text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." +} \ No newline at end of file diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/template.json b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/template.json new file mode 100644 index 00000000000..d4c10ba06fb --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/.template.config/template.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ + "Template Authoring" + ], + "name": "Template Package", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project for a template package containing .NET templates.", + "groupIdentity": "Microsoft.TemplateEngine.Authoring.TemplatePackage", + "precedence": "0", + "identity": "Microsoft.TemplateEngine.Authoring.TemplatePackage.1.0", + "shortName": "templatepack", + "tags": { + "type": "project" + }, + "sourceName": "New.Template.Package", + "symbols": { + "EnableMSBuildTasks": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "true" + } + }, + "primaryOutputs": [ + { + "path": "New.Template.Package.csproj" + } + ], + "postActions": [ + { + "id": "instructions", + "description": "Manual actions required", + "manualInstructions": [ + { + "text": "Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md." + } + ], + "actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C", + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/New.Template.Package.csproj b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/New.Template.Package.csproj new file mode 100644 index 00000000000..04f8107728d --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/New.Template.Package.csproj @@ -0,0 +1,39 @@ + + + + + + New.Template.Package + 1.0 + TODO: fill the package name here + TODO: fill the author name or organization here + TODO: fill the package description here + TODO: fill the tags here + TODO: include a link to an associated project, repository, or company website + + + Template + net8.0 + true + false + content + $(NoWarn);NU5128 + true + + + + + false + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/README.md b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/README.md new file mode 100644 index 00000000000..93d46c8c99b --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/README.md @@ -0,0 +1,2 @@ + diff --git a/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/content/SampleTemplate/placeholder.txt b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/content/SampleTemplate/placeholder.txt new file mode 100644 index 00000000000..6f0c602d38e --- /dev/null +++ b/template_feed/Microsoft.TemplateEngine.Authoring.Templates/content/TemplatePackage/content/SampleTemplate/placeholder.txt @@ -0,0 +1 @@ +Place your templates to this folder. diff --git a/template_feed/README.md b/template_feed/README.md index 18e8a7cf1a9..0e58ff97cd0 100644 --- a/template_feed/README.md +++ b/template_feed/README.md @@ -1 +1 @@ -The source code is moved to [dotnet/sdk](https://github.com/dotnet/sdk/tree/main/template_feed). \ No newline at end of file +The source code for common item and common project templates is moved to [dotnet/sdk](https://github.com/dotnet/sdk/tree/main/template_feed). \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/AuthoringTemplatesTests.cs b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/AuthoringTemplatesTests.cs new file mode 100644 index 00000000000..f87a2946758 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/AuthoringTemplatesTests.cs @@ -0,0 +1,224 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Extensions.Logging; +using Microsoft.TemplateEngine.Authoring.TemplateApiVerifier; +using Microsoft.TemplateEngine.Authoring.TemplateVerifier; +using Microsoft.TemplateEngine.TestHelper; +using Microsoft.TemplateEngine.Tests; +using Xunit.Abstractions; + +namespace Microsoft.TemplateEngine.Authoring.Templates.Tests +{ + public class AuthoringTemplatesTests : TestBase + { + private readonly ILogger _log; + + public AuthoringTemplatesTests(ITestOutputHelper log) + { + _log = new XunitLoggerProvider(log).CreateLogger("TestRun"); + } + + [Fact] + public async Task TemplateJsonTest() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "template.json"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "Basic", + } + .WithInstantiationThroughTemplateCreatorApi(new Dictionary()); + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplateJsonTest_WithParameters() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "template.json"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + var templateParams = new Dictionary() + { + { "TemplateName", "MyTemplate" }, + { "TemplateShortName", "mytemplate" }, + { "TemplateIdentity", "My.Template.Identity" }, + }; + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "WithParams", + } + .WithInstantiationThroughTemplateCreatorApi(templateParams); + + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplateJsonTest_NoConfigFolder() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "template.json"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + var templateParams = new Dictionary() + { + { "CreateTemplateConfigFolder", "false" } + }; + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "NoConfigFolder", + } + .WithInstantiationThroughTemplateCreatorApi(templateParams); + + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplatePackageTest() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "templatepack"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "Basic", + } + .WithInstantiationThroughTemplateCreatorApi(new Dictionary()); + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplatePackageTest_WithName() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "templatepack"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + var templateParams = new Dictionary() + { + { "name", "MyTemplatePackage" }, + }; + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "WithName", + } + .WithInstantiationThroughTemplateCreatorApi(templateParams); + + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplatePackageTest_NoMSBuildTasks() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "templatepack"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + var templateParams = new Dictionary() + { + { "EnableMSBuildTasks", "false" }, + }; + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + ScenarioName = "NoMSBuildTasks", + } + .WithInstantiationThroughTemplateCreatorApi(templateParams); + + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplateJsonTest_CLI() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "template.json"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + VerifyCommandOutput = true, + ScenarioName = "CLI", + }; + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + + [Fact] + public async Task TemplatePackageTest_CLI() + { + string workingDir = TestUtils.CreateTemporaryFolder(); + string templateShortName = "templatepack"; + + //get the template location + string templateLocation = Path.Combine(TemplateFeedLocation, "Microsoft.TemplateEngine.Authoring.Templates"); + + TemplateVerifierOptions options = new TemplateVerifierOptions(templateName: templateShortName) + { + TemplatePath = templateLocation, + SnapshotsDirectory = "Snapshots", + OutputDirectory = workingDir, + DoNotPrependCallerMethodNameToScenarioName = true, + VerifyCommandOutput = true, + ScenarioName = "CLI", + }; + VerificationEngine engine = new VerificationEngine(_log); + await engine.Execute(options); + } + } +} diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests.csproj b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests.csproj new file mode 100644 index 00000000000..7d85d6d3c45 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests.csproj @@ -0,0 +1,30 @@ + + + + $(NETCoreTargetFramework) + enable + enable + false + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.Basic.verified/template.json/.template.config/template.json b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.Basic.verified/template.json/.template.config/template.json new file mode 100644 index 00000000000..3759f9bbeb1 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.Basic.verified/template.json/.template.config/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json.schemastore.org/template", + "$comment": "See https://aka.ms/template-json-reference for complete configuration description. Complete TODOs below and remove the $comment properties. It is recommended to use the JSON editor that supports schema hints to get more information about defined JSON properties and their description.", + "author": "TODO: fill author name here.", + "classifications": [ + "TODO: fill classification here. Common classifications are: Library, Test, Web etc. Each classification should be a separate element of the array. For more details, see https://aka.ms/template-json-reference#classifications." + ], + "name": "New Template", + "description": "TODO: fill the template description here.", + "precedence": "0", + "identity": "New.Template.Identity", + "shortName": "new-template", + "tags": { + "$comment": "TODO: fill the language and type below. Common types are: project, item, solution.", + "language": "C#", + "type": "project" + }, + "$comment_sourceName": "TODO: Source name should follow these rules: https://aka.ms/template-json-source-name. Source name may be removed if replacement for name is not required.", + "sourceName": "New.Template.1", + "preferNameDirectory": true, + "symbols": { + "ExampleParameter": { + "$comment": "TODO: The symbols section defines variables and their values. For more details, see https://aka.ms/template-json-reference#symbols.", + "type": "parameter", + "datatype": "string", + "defaultValue": "example", + "replaces": "valueToReplace", + "isEnabled": false + } + }, + "sources": [ + { + "$comment": "TODO: Sources control the paths for source and target content. For more details see https://aka.ms/template-json-reference#symbols#source-definition. If source definition is not required, remove the property.", + "condition": "false", + "source": "./source-files", + "target": "./target" + } + ], + "constraints": { + "SampleConstraint": { + "$comment": "TODO: The template may define the constraints all of which must be met in order for the template to be used. For more details see https://aka.ms/template-json-reference#symbols#template-constraints. If constraints are not required, remove the property.", + "type": "os", + "args": [ "Linux", "OSX", "Windows" ] + } + }, + "primaryOutputs": [ + { + "$comment": "TODO: Primary outputs define the list of template files for further processing, usually post actions. If primary outputs are not required, remove the property.", + "path": "New.Template.1.cs", + "condition": "false" + } + ], + "postActions": [ + { + "$comment": "TODO: Enables actions to be performed after the project is created. For more details see https://aka.ms/template-json-post-actions. If post actions are not required, remove the property.", + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "condition": "false", + "id": "sample-post-action", + "manualInstructions": [ + { + "text": "Open file in New.Template.1.cs in the editor." + } + ], + "args": { + "files": "0" + } + } + ] +} diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stderr.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stderr.txt new file mode 100644 index 00000000000..5f282702bb0 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stderr.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stdout.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stdout.txt new file mode 100644 index 00000000000..ef0b9b51e7b --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/std-streams/stdout.txt @@ -0,0 +1,5 @@ +The template "template.json configuration file" was created successfully. + +Processing post-creation actions... +Description: Manual actions required +Manual instructions: Open template.json in the editor and complete the configuration. \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/template.json/.template.config/template.json b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/template.json/.template.config/template.json new file mode 100644 index 00000000000..3759f9bbeb1 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.CLI.verified/template.json/.template.config/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json.schemastore.org/template", + "$comment": "See https://aka.ms/template-json-reference for complete configuration description. Complete TODOs below and remove the $comment properties. It is recommended to use the JSON editor that supports schema hints to get more information about defined JSON properties and their description.", + "author": "TODO: fill author name here.", + "classifications": [ + "TODO: fill classification here. Common classifications are: Library, Test, Web etc. Each classification should be a separate element of the array. For more details, see https://aka.ms/template-json-reference#classifications." + ], + "name": "New Template", + "description": "TODO: fill the template description here.", + "precedence": "0", + "identity": "New.Template.Identity", + "shortName": "new-template", + "tags": { + "$comment": "TODO: fill the language and type below. Common types are: project, item, solution.", + "language": "C#", + "type": "project" + }, + "$comment_sourceName": "TODO: Source name should follow these rules: https://aka.ms/template-json-source-name. Source name may be removed if replacement for name is not required.", + "sourceName": "New.Template.1", + "preferNameDirectory": true, + "symbols": { + "ExampleParameter": { + "$comment": "TODO: The symbols section defines variables and their values. For more details, see https://aka.ms/template-json-reference#symbols.", + "type": "parameter", + "datatype": "string", + "defaultValue": "example", + "replaces": "valueToReplace", + "isEnabled": false + } + }, + "sources": [ + { + "$comment": "TODO: Sources control the paths for source and target content. For more details see https://aka.ms/template-json-reference#symbols#source-definition. If source definition is not required, remove the property.", + "condition": "false", + "source": "./source-files", + "target": "./target" + } + ], + "constraints": { + "SampleConstraint": { + "$comment": "TODO: The template may define the constraints all of which must be met in order for the template to be used. For more details see https://aka.ms/template-json-reference#symbols#template-constraints. If constraints are not required, remove the property.", + "type": "os", + "args": [ "Linux", "OSX", "Windows" ] + } + }, + "primaryOutputs": [ + { + "$comment": "TODO: Primary outputs define the list of template files for further processing, usually post actions. If primary outputs are not required, remove the property.", + "path": "New.Template.1.cs", + "condition": "false" + } + ], + "postActions": [ + { + "$comment": "TODO: Enables actions to be performed after the project is created. For more details see https://aka.ms/template-json-post-actions. If post actions are not required, remove the property.", + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "condition": "false", + "id": "sample-post-action", + "manualInstructions": [ + { + "text": "Open file in New.Template.1.cs in the editor." + } + ], + "args": { + "files": "0" + } + } + ] +} diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.NoConfigFolder.verified/template.json/template.json b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.NoConfigFolder.verified/template.json/template.json new file mode 100644 index 00000000000..3759f9bbeb1 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.NoConfigFolder.verified/template.json/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json.schemastore.org/template", + "$comment": "See https://aka.ms/template-json-reference for complete configuration description. Complete TODOs below and remove the $comment properties. It is recommended to use the JSON editor that supports schema hints to get more information about defined JSON properties and their description.", + "author": "TODO: fill author name here.", + "classifications": [ + "TODO: fill classification here. Common classifications are: Library, Test, Web etc. Each classification should be a separate element of the array. For more details, see https://aka.ms/template-json-reference#classifications." + ], + "name": "New Template", + "description": "TODO: fill the template description here.", + "precedence": "0", + "identity": "New.Template.Identity", + "shortName": "new-template", + "tags": { + "$comment": "TODO: fill the language and type below. Common types are: project, item, solution.", + "language": "C#", + "type": "project" + }, + "$comment_sourceName": "TODO: Source name should follow these rules: https://aka.ms/template-json-source-name. Source name may be removed if replacement for name is not required.", + "sourceName": "New.Template.1", + "preferNameDirectory": true, + "symbols": { + "ExampleParameter": { + "$comment": "TODO: The symbols section defines variables and their values. For more details, see https://aka.ms/template-json-reference#symbols.", + "type": "parameter", + "datatype": "string", + "defaultValue": "example", + "replaces": "valueToReplace", + "isEnabled": false + } + }, + "sources": [ + { + "$comment": "TODO: Sources control the paths for source and target content. For more details see https://aka.ms/template-json-reference#symbols#source-definition. If source definition is not required, remove the property.", + "condition": "false", + "source": "./source-files", + "target": "./target" + } + ], + "constraints": { + "SampleConstraint": { + "$comment": "TODO: The template may define the constraints all of which must be met in order for the template to be used. For more details see https://aka.ms/template-json-reference#symbols#template-constraints. If constraints are not required, remove the property.", + "type": "os", + "args": [ "Linux", "OSX", "Windows" ] + } + }, + "primaryOutputs": [ + { + "$comment": "TODO: Primary outputs define the list of template files for further processing, usually post actions. If primary outputs are not required, remove the property.", + "path": "New.Template.1.cs", + "condition": "false" + } + ], + "postActions": [ + { + "$comment": "TODO: Enables actions to be performed after the project is created. For more details see https://aka.ms/template-json-post-actions. If post actions are not required, remove the property.", + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "condition": "false", + "id": "sample-post-action", + "manualInstructions": [ + { + "text": "Open file in New.Template.1.cs in the editor." + } + ], + "args": { + "files": "0" + } + } + ] +} diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.WithParams.verified/template.json/.template.config/template.json b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.WithParams.verified/template.json/.template.config/template.json new file mode 100644 index 00000000000..d4d55a312a4 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/template.json.WithParams.verified/template.json/.template.config/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json.schemastore.org/template", + "$comment": "See https://aka.ms/template-json-reference for complete configuration description. Complete TODOs below and remove the $comment properties. It is recommended to use the JSON editor that supports schema hints to get more information about defined JSON properties and their description.", + "author": "TODO: fill author name here.", + "classifications": [ + "TODO: fill classification here. Common classifications are: Library, Test, Web etc. Each classification should be a separate element of the array. For more details, see https://aka.ms/template-json-reference#classifications." + ], + "name": "MyTemplate", + "description": "TODO: fill the template description here.", + "precedence": "0", + "identity": "My.Template.Identity", + "shortName": "mytemplate", + "tags": { + "$comment": "TODO: fill the language and type below. Common types are: project, item, solution.", + "language": "C#", + "type": "project" + }, + "$comment_sourceName": "TODO: Source name should follow these rules: https://aka.ms/template-json-source-name. Source name may be removed if replacement for name is not required.", + "sourceName": "New.Template.1", + "preferNameDirectory": true, + "symbols": { + "ExampleParameter": { + "$comment": "TODO: The symbols section defines variables and their values. For more details, see https://aka.ms/template-json-reference#symbols.", + "type": "parameter", + "datatype": "string", + "defaultValue": "example", + "replaces": "valueToReplace", + "isEnabled": false + } + }, + "sources": [ + { + "$comment": "TODO: Sources control the paths for source and target content. For more details see https://aka.ms/template-json-reference#symbols#source-definition. If source definition is not required, remove the property.", + "condition": "false", + "source": "./source-files", + "target": "./target" + } + ], + "constraints": { + "SampleConstraint": { + "$comment": "TODO: The template may define the constraints all of which must be met in order for the template to be used. For more details see https://aka.ms/template-json-reference#symbols#template-constraints. If constraints are not required, remove the property.", + "type": "os", + "args": [ "Linux", "OSX", "Windows" ] + } + }, + "primaryOutputs": [ + { + "$comment": "TODO: Primary outputs define the list of template files for further processing, usually post actions. If primary outputs are not required, remove the property.", + "path": "New.Template.1.cs", + "condition": "false" + } + ], + "postActions": [ + { + "$comment": "TODO: Enables actions to be performed after the project is created. For more details see https://aka.ms/template-json-post-actions. If post actions are not required, remove the property.", + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "condition": "false", + "id": "sample-post-action", + "manualInstructions": [ + { + "text": "Open file in New.Template.1.cs in the editor." + } + ], + "args": { + "files": "0" + } + } + ] +} diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/README.md b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/README.md new file mode 100644 index 00000000000..e9c4c2fb059 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/README.md @@ -0,0 +1,2 @@ + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/content/SampleTemplate/placeholder.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/content/SampleTemplate/placeholder.txt new file mode 100644 index 00000000000..5c9d9e9116a --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/content/SampleTemplate/placeholder.txt @@ -0,0 +1 @@ +Place your templates to this folder. diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/templatepack.csproj b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/templatepack.csproj new file mode 100644 index 00000000000..a2abc888924 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.Basic.verified/templatepack/templatepack.csproj @@ -0,0 +1,37 @@ + + + + + + templatepack + 1.0 + TODO: fill the package name here + TODO: fill the author name or organization here + TODO: fill the package description here + TODO: fill the tags here + TODO: include a link to an associated project, repository, or company website + + + Template + net8.0 + true + false + content + $(NoWarn);NU5128 + true + + + + false + + + + + + + + + + + + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stderr.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stderr.txt new file mode 100644 index 00000000000..5f282702bb0 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stderr.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stdout.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stdout.txt new file mode 100644 index 00000000000..f4cbee2a6ed --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/std-streams/stdout.txt @@ -0,0 +1,5 @@ +The template "Template Package" was created successfully. + +Processing post-creation actions... +Description: Manual actions required +Manual instructions: Open *.csproj in the editor and complete the package metadata configuration. Copy the templates to 'content' folder. Fill in README.md. \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/README.md b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/README.md new file mode 100644 index 00000000000..e9c4c2fb059 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/README.md @@ -0,0 +1,2 @@ + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/content/SampleTemplate/placeholder.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/content/SampleTemplate/placeholder.txt new file mode 100644 index 00000000000..5c9d9e9116a --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/content/SampleTemplate/placeholder.txt @@ -0,0 +1 @@ +Place your templates to this folder. diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/templatepack.csproj b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/templatepack.csproj new file mode 100644 index 00000000000..a2abc888924 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.CLI.verified/templatepack/templatepack.csproj @@ -0,0 +1,37 @@ + + + + + + templatepack + 1.0 + TODO: fill the package name here + TODO: fill the author name or organization here + TODO: fill the package description here + TODO: fill the tags here + TODO: include a link to an associated project, repository, or company website + + + Template + net8.0 + true + false + content + $(NoWarn);NU5128 + true + + + + false + + + + + + + + + + + + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/README.md b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/README.md new file mode 100644 index 00000000000..e9c4c2fb059 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/README.md @@ -0,0 +1,2 @@ + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/content/SampleTemplate/placeholder.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/content/SampleTemplate/placeholder.txt new file mode 100644 index 00000000000..5c9d9e9116a --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/content/SampleTemplate/placeholder.txt @@ -0,0 +1 @@ +Place your templates to this folder. diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/templatepack.csproj b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/templatepack.csproj new file mode 100644 index 00000000000..86f28914436 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.NoMSBuildTasks.verified/templatepack/templatepack.csproj @@ -0,0 +1,29 @@ + + + + + + templatepack + 1.0 + TODO: fill the package name here + TODO: fill the author name or organization here + TODO: fill the package description here + TODO: fill the tags here + TODO: include a link to an associated project, repository, or company website + + + Template + net8.0 + true + false + content + $(NoWarn);NU5128 + true + + + + + + + + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/MyTemplatePackage.csproj b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/MyTemplatePackage.csproj new file mode 100644 index 00000000000..56da967270e --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/MyTemplatePackage.csproj @@ -0,0 +1,37 @@ + + + + + + MyTemplatePackage + 1.0 + TODO: fill the package name here + TODO: fill the author name or organization here + TODO: fill the package description here + TODO: fill the tags here + TODO: include a link to an associated project, repository, or company website + + + Template + net8.0 + true + false + content + $(NoWarn);NU5128 + true + + + + false + + + + + + + + + + + + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/README.md b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/README.md new file mode 100644 index 00000000000..e9c4c2fb059 --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/README.md @@ -0,0 +1,2 @@ + diff --git a/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/content/SampleTemplate/placeholder.txt b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/content/SampleTemplate/placeholder.txt new file mode 100644 index 00000000000..5c9d9e9116a --- /dev/null +++ b/test/Microsoft.TemplateEngine.Authoring.Templates.IntegrationTests/Snapshots/templatepack.WithName.verified/templatepack/content/SampleTemplate/placeholder.txt @@ -0,0 +1 @@ +Place your templates to this folder. diff --git a/test/Shared/TestBase.cs b/test/Shared/TestBase.cs index 065a23b66b7..165bfb9d63e 100644 --- a/test/Shared/TestBase.cs +++ b/test/Shared/TestBase.cs @@ -38,6 +38,8 @@ internal static string ShippingPackagesLocation } } + internal static string TemplateFeedLocation { get; } = Path.Combine(CodeBaseRoot, "template_feed"); + internal static string TestTemplatesLocation { get; } = Path.Combine(CodeBaseRoot, "test", "Microsoft.TemplateEngine.TestTemplates", "test_templates"); internal static string TestTemplatePackagesLocation { get; } = Path.Combine(CodeBaseRoot, "test", "Microsoft.TemplateEngine.TestTemplates", "nupkg_templates");