diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.de.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.en.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.es.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.it.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..f2d6962e013b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,8 @@ +{ + "author": "Microsoft", + "name": "dotnet config file", + "description": "A file for configuring dotnet CLI behavior.", + "symbols/runner/description": "The test runner to use.", + "symbols/runner/displayName": "Test runner", + "postActions/open-file/description": "Opens dotnet.config in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/template.json new file mode 100644 index 000000000000..630d71cd2389 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/.template.config/template.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ + "Config" + ], + "name": "dotnet config file", + "generatorVersions": "[1.0.0.0-*)", + "description": "A file for configuring dotnet CLI behavior.", + "tags": { + "type": "item" + }, + "groupIdentity": "DotnetConfigFile", + "precedence": "100", + "identity": "Microsoft.Standard.QuickStarts.DotnetConfigFile", + "shortName": [ "dotnetconfig", "dotnet.config" ], + "sourceName": "unused", + "primaryOutputs": [ + { + "path": "dotnet.config" + } + ], + "defaultName": "dotnet.config", + "symbols": { + "HostIdentifier": { + "type": "bind", + "binding": "HostIdentifier" + }, + "runner": { + "type": "parameter", + "datatype": "string", + "description": "The test runner to use.", + "displayName": "Test runner", + "defaultValue": "", + "replaces": "RUNNER_NAME" + }, + "hasRunner": { + "type": "computed", + "value": "(runner != \"\")" + } + }, + "postActions": [ + { + "id": "open-file", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens dotnet.config in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/dotnet.config b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/dotnet.config new file mode 100644 index 000000000000..dd0eee2aa342 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/dotnet.config @@ -0,0 +1,4 @@ +//#if (hasRunner) +[dotnet.test.runner] +name = "RUNNER_NAME" +//#endif \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/SharedHomeDirectory.cs b/test/dotnet-new.IntegrationTests/SharedHomeDirectory.cs index e7b91db01f32..af8e30d81d3e 100644 --- a/test/dotnet-new.IntegrationTests/SharedHomeDirectory.cs +++ b/test/dotnet-new.IntegrationTests/SharedHomeDirectory.cs @@ -99,6 +99,19 @@ private void Initialize() .ExitWith(0) .And .NotHaveStdErr(); + + // Install the ItemTemplates that contain templates like global.json, gitignore, etc. + string itemTemplatesPath = Path.Combine(Environment.CurrentDirectory, "template_feed", "Microsoft.DotNet.Common.ItemTemplates", "content"); + if (Directory.Exists(itemTemplatesPath)) + { + new DotnetNewCommand(Log, "install", itemTemplatesPath) + .WithCustomHive(HomeDirectory) + .Execute() + .Should() + .ExitWith(0) + .And + .NotHaveStdErr(); + } } } }