diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1.Client/_Imports.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1.Client/_Imports.razor index 674eac341d64..4b41f97fe01c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1.Client/_Imports.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1.Client/_Imports.razor @@ -12,4 +12,4 @@ @using BlazorWebCSharp._1.Client @*#if (UseWebAssembly && InteractiveAtRoot) --> @using BlazorWebCSharp._1.Client.Layout -##endif*@ \ No newline at end of file +##endif*@ diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Pages/NotFound.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Pages/NotFound.razor index 917ada1d2328..091b6b8bc5ee 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Pages/NotFound.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Pages/NotFound.razor @@ -2,4 +2,4 @@ @layout MainLayout
Sorry, the content you are looking for does not exist.
\ No newline at end of file +Sorry, the content you are looking for does not exist.
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/wwwroot/app.css b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/wwwroot/app.css index f43d4d7b77ae..3902f865ad3f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/wwwroot/app.css +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/wwwroot/app.css @@ -59,4 +59,4 @@ h1:focus { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Pages/NotFound.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Pages/NotFound.razor index 917ada1d2328..091b6b8bc5ee 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Pages/NotFound.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Pages/NotFound.razor @@ -2,4 +2,4 @@ @layout MainLayoutSorry, the content you are looking for does not exist.
\ No newline at end of file +Sorry, the content you are looking for does not exist.
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot/css/app.css b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot/css/app.css index efef290c1836..7539aad8b93e 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot/css/app.css +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot/css/app.css @@ -114,4 +114,4 @@ code { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/css/site.css b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/css/site.css index 819f61241bb3..454265088e70 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/css/site.css +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/css/site.css @@ -28,4 +28,4 @@ body { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/css/site.css b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/css/site.css index 819f61241bb3..454265088e70 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/css/site.css +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/css/site.css @@ -28,4 +28,4 @@ body { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/css/site.css b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/css/site.css index 3ae451900f3c..786ccace5be9 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/css/site.css +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/css/site.css @@ -71,4 +71,4 @@ body { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs/strings.json index 5ef3acce5dbc..3afaf46a094d 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/cs/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Použití ovladačů", "parameter.UseMinimalAPIs.description": "Místo minimálních rozhraní API používejte kontrolery." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de/strings.json index 9e0c5f064a60..32b3b41a95d0 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/de/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Controller verwenden", "parameter.UseMinimalAPIs.description": "Verwenden Sie Controller anstelle minimaler APIs." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/dotnetcli.host.json index ff259de599b8..a1b4134c2c96 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/dotnetcli.host.json @@ -99,4 +99,4 @@ "usageExamples": [ "" ] -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es/strings.json index efba45376922..15d70d02a2fd 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/es/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Utilizar controladores", "parameter.UseMinimalAPIs.description": "Utilice controladores en lugar de API mínimas." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr/strings.json index a5b26a612266..b835be6ccacc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/fr/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Utiliser des contrôleurs", "parameter.UseMinimalAPIs.description": "Utilisez des contrôleurs à la place des API minimales." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it/strings.json index fded2cb43274..945ab03c5d0e 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/it/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Usa i controller", "parameter.UseMinimalAPIs.description": "Usa i controller anziché le API minime." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja/strings.json index c3b3f2fdbe1e..5bd793acc579 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ja/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "コントローラーを使用する", "parameter.UseMinimalAPIs.description": "最小限の API ではなくコントローラーを使用します。" } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko/strings.json index 332cfe0844f7..092decfe43f6 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ko/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "컨트롤러 사용", "parameter.UseMinimalAPIs.description": "최소 API 대신 컨트롤러를 사용합니다." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl/strings.json index 016f03a4789e..2448c39bf579 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pl/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Użyj kontrolerów", "parameter.UseMinimalAPIs.description": "Użyj kontrolerów zamiast minimalnych interfejsów API." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json index b071c22ebeb7..d4eea750f601 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/pt-BR/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Usar controles", "parameter.UseMinimalAPIs.description": "Use controles em vez de APIs mínimas." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru/strings.json index 31b0bade52fe..a61661394804 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/ru/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Использовать контроллеры", "parameter.UseMinimalAPIs.description": "Используйте контроллеры вместо минимальных API." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr/strings.json index 5c1d97a80f9e..95f5484dbca5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/tr/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "Denetleyicileri kullan", "parameter.UseMinimalAPIs.description": "Minimal API yerine denetleyicileri kullanın." } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hans/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hans/strings.json index 7a55ec801dd2..9143c437c46c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hans/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hans/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "使用控制器", "parameter.UseMinimalAPIs.description": "使用控制器而不是最小 API。" } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hant/strings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hant/strings.json index f45a6ddf64e3..8f0fa7b2e839 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hant/strings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/zh-Hant/strings.json @@ -8,4 +8,4 @@ "parameter.UseMinimalAPIs.name": "使用控制器", "parameter.UseMinimalAPIs.description": "使用控制器,而不使用最小 API。" } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/dotnetcli.host.json index d24ccc689f1c..cf66683674a7 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/dotnetcli.host.json @@ -30,4 +30,4 @@ "usageExamples": [ "" ] -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/ide.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/ide.host.json index de0bfb10ae91..d5e928040b0d 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/ide.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/ide.host.json @@ -26,4 +26,4 @@ "persistenceScope": "templateGroup" } ] -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/template.json index 26f2ea88e496..a4b53862f6ea 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/template.json @@ -162,4 +162,4 @@ "continueOnError": true } ] -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-FSharp/Program.fs b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-FSharp/Program.fs index aa488b71f2c4..71622b50edc9 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-FSharp/Program.fs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-FSharp/Program.fs @@ -16,4 +16,4 @@ module Program = builder.Build().Run() - 0 // exit code \ No newline at end of file + 0 // exit code diff --git a/src/ProjectTemplates/test/Templates.Tests/NewlineEndingTest.cs b/src/ProjectTemplates/test/Templates.Tests/NewlineEndingTest.cs new file mode 100644 index 000000000000..313b77b0f67d --- /dev/null +++ b/src/ProjectTemplates/test/Templates.Tests/NewlineEndingTest.cs @@ -0,0 +1,91 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.AspNetCore.InternalTesting; +using Templates.Test.Helpers; +using Xunit; +using Xunit.Abstractions; + +namespace Templates.Test; + +public class NewlineEndingTest : LoggedTest +{ + private ITestOutputHelper _output; + public ITestOutputHelper Output + { + get + { + if (_output == null) + { + _output = new TestOutputLogger(Logger); + } + return _output; + } + } + + [Theory] + [InlineData("Web.ProjectTemplates")] + [InlineData("Web.ItemTemplates")] + [InlineData("Web.Client.ItemTemplates")] + public void TemplateFiles_ShouldEndWithNewline(string projectName) + { + var templateDirectoryPath = GetTemplateDirectoryPath(projectName); + + var filesWithoutNewlineEnding = new List