Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"longName": "roll-forward",
"shortName": ""
},
"TestRunner": {
"longName": "test-runner",
"shortName": ""
},
"dotnet-cli-version": {
"isHidden": "true"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Nejnovější hlavní verze",
"symbols/RollForward/choices/disable/description": "Nedá se posunout vpřed. Vyžaduje se přesná shoda.",
"symbols/RollForward/choices/disable/displayName": "Zakázat posunutí vpřed",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Otevře global.json v editoru."
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Neueste Haupt-",
"symbols/RollForward/choices/disable/description": "Kein Rollforward. Exakte Übereinstimmung erforderlich.",
"symbols/RollForward/choices/disable/displayName": "Rollforward deaktivieren",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Öffnet „global.json“ im Editor."
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Latest major",
"symbols/RollForward/choices/disable/description": "Doesn't roll forward. Exact match required.",
"symbols/RollForward/choices/disable/displayName": "Disable roll-forward",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Opens global.json in the editor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Última versión principal",
"symbols/RollForward/choices/disable/description": "No se hace un reenvío. Se requiere una coincidencia exacta.",
"symbols/RollForward/choices/disable/displayName": "Deshabilitar el reenvío",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Abre global.json el editor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Dernière version majeure",
"symbols/RollForward/choices/disable/description": "Ne pas restaurer par progression vers l’avant. Correspondance exacte requise.",
"symbols/RollForward/choices/disable/displayName": "Désactiver la restauration par progression",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Ouvre global.json dans l’éditeur"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Valore principale più recente",
"symbols/RollForward/choices/disable/description": "Non esegue il roll-forward. Corrispondenza esatta richiesta.",
"symbols/RollForward/choices/disable/displayName": "Disabilita roll-forward",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Apre global.json nell'editor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "最新のメジャー",
"symbols/RollForward/choices/disable/description": "ロールフォワードしません。完全に一致する必要があります。",
"symbols/RollForward/choices/disable/displayName": "ロールフォワードの無効化",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "エディターで global.json を開く"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "최신 주",
"symbols/RollForward/choices/disable/description": "롤포워드하지 않습니다. 정확히 일치해야 합니다.",
"symbols/RollForward/choices/disable/displayName": "롤포워드 비활성화",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "편집기에서 global.json을 엽니다"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Najnowszy przedział główny",
"symbols/RollForward/choices/disable/description": "Nie przechodzi. Wymagane jest dokładne dopasowanie.",
"symbols/RollForward/choices/disable/displayName": "Wyłącz przechodzenie",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Otwiera plik global.json w edytorze"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Principal mais recente",
"symbols/RollForward/choices/disable/description": "Não rola para frente. Correspondência exata necessária.",
"symbols/RollForward/choices/disable/displayName": "Desabilitar rolar para frente",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Abrir global.json no editor"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Последняя основная версия",
"symbols/RollForward/choices/disable/description": "Накат не выполняется. Требуется точное совпадение.",
"symbols/RollForward/choices/disable/displayName": "Отключить накат",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Открывает файл global.json в редакторе"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "Son birincil sürüm",
"symbols/RollForward/choices/disable/description": "İleri sarılmıyor. Tam eşleşme gerekiyor.",
"symbols/RollForward/choices/disable/displayName": "İleri sarma devre dışı bırakıldı",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "Düzenleyicide global.json dosyasını açar"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "最新主要版本",
"symbols/RollForward/choices/disable/description": "不要前滚。需要完全匹配。",
"symbols/RollForward/choices/disable/displayName": "禁用前滚",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "在编辑器中打开 global.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@
"symbols/RollForward/choices/latestMajor/displayName": "最新主要",
"symbols/RollForward/choices/disable/description": "不向前復原。需要完全相符。",
"symbols/RollForward/choices/disable/displayName": "停用向前復原",
"symbols/TestRunner/description": "The test runner to use.",
"symbols/TestRunner/displayName": "Test runner",
"symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner",
"symbols/TestRunner/choices/VSTest/displayName": "VSTest",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner",
"symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform",
"postActions/open-file/description": "在編輯器中開啟 global.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@
"displayName": "Disable roll-forward"
}
]
},
"TestRunner": {
"type": "parameter",
"description": "The test runner to use.",
"displayName": "Test runner",
"replaces": "TEST_RUNNER_VALUE",
"defaultValue": "",
"datatype": "choice",
"choices": [
{
"choice": "VSTest",
"description": "Use VSTest as test runner",
"displayName": "VSTest"
},
{
"choice": "Microsoft.Testing.Platform",
"description": "Use Microsoft.Testing.Platform as test runner",
"displayName": "Microsoft.Testing.Platform"
}
]
}
},
"postActions": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
"rollForward": "ROLL_FORWARD_VALUE",
//#endif
"version": "SDK_VERSION"
//#if (TestRunner=="")
}
}
//#else
},
"test": {
"runner": "TEST_RUNNER_VALUE"
}
//#endif
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sdk": {
"rollForward": "major",
"version": "%CURRENT-VER%"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "%TEMPLATE_NAME%" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"sdk": {
"version": "6.0.200"
},
"test": {
"runner": "VSTest"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "%TEMPLATE_NAME%" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"sdk": {
"version": "%CURRENT-VER%"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "%TEMPLATE_NAME%" was created successfully.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"sdk": {
"version": "%CURRENT-VER%"
},
"test": {
"runner": "VSTest"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The template "%TEMPLATE_NAME%" was created successfully.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"sdk": {
"version": "%CURRENT-VER%"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ Template options:
latestFeature Uses the highest installed feature band and patch level that matches the requested major and minor with a feature band and patch level that is greater or equal than the specified value. If not found, fails.
latestMinor Uses the highest installed minor, feature band, and patch level that matches the requested major with a minor, feature band, and patch level that is greater or equal than the specified value. If not found, fails.
latestMajor Uses the highest installed .NET SDK with a version that is greater or equal than the specified value. If not found, fail.
disable Doesn't roll forward. Exact match required.
disable Doesn't roll forward. Exact match required.
--test-runner <Microsoft.Testing.Platform|VSTest> The test runner to use.
Type: choice
VSTest Use VSTest as test runner
Microsoft.Testing.Platform Use Microsoft.Testing.Platform as test runner
9 changes: 8 additions & 1 deletion test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ public CommonTemplatesTests(SharedHomeDirectory fixture, ITestOutputHelper log)
[InlineData("global.json file", "globaljson", null)]
[InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200" })]
[InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200", "--roll-forward", "major" })]
[InlineData("global.json file", "globaljson", new[] { "--test-runner", "VSTest" })]
[InlineData("global.json file", "globaljson", new[] { "--test-runner", "Microsoft.Testing.Platform" })]
[InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200", "--test-runner", "VSTest" })]
[InlineData("global.json file", "globaljson", new[] { "--roll-forward", "major", "--test-runner", "Microsoft.Testing.Platform" })]
[InlineData("global.json file", "global.json", null)]
[InlineData("global.json file", "global.json", new[] { "--sdk-version", "6.0.200" })]
[InlineData("global.json file", "global.json", new[] { "--sdk-version", "6.0.200", "--roll-forward", "major" })]
[InlineData("global.json file", "global.json", new[] { "--test-runner", "VSTest" })]
[InlineData("global.json file", "global.json", new[] { "--test-runner", "Microsoft.Testing.Platform" })]
[InlineData("NuGet Config", "nugetconfig", null)]
[InlineData("NuGet Config", "nuget.config", null)]
[InlineData("dotnet gitignore file", "gitignore", null)]
Expand Down Expand Up @@ -82,7 +88,8 @@ public async Task AllCommonItemsCreate(string expectedTemplateName, string templ

// globaljson is appending current sdk version. Due to the 'base' dotnet used to run test this version differs
// on dev and CI runs and possibly from the version within test host. Easiest is just to scrub it away
if (expectedTemplateName.Equals("global.json file") && args == null)
if (expectedTemplateName.Equals("global.json file") &&
(args == null || !args.Contains("--sdk-version")))
{
string sdkVersionUnderTest = await new SdkInfoProvider().GetCurrentVersionAsync(default);
options.CustomScrubbers?.AddScrubber(sb => sb.Replace(sdkVersionUnderTest, "%CURRENT-VER%"), "json");
Expand Down
Loading