From a5b9fd16503cc38c00b0e4d8c73596d95369e558 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:17:48 +0200 Subject: [PATCH] V15: Update to dotnet 9 (#16625) * Update to dotnet 9 and update nuget packages * Update umbraco code version * Update Directory.Build.props Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Include preview version in pipeline * update template projects * update global json with specific version * Update version.json to v15 * Rename TrimStart and TrimEnd to string specific * Rename to Exact * Update global.json Co-authored-by: Ronald Barendse * Remove includePreviewVersion * Rename to trim exact --------- Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: Ronald Barendse --- Directory.Build.props | 2 +- Directory.Packages.props | 46 +++++++++---------- build/azure-pipelines.yml | 2 +- global.json | 2 +- .../OpenApi/SchemaIdHandler.cs | 2 +- .../Services/ApiMediaQueryService.cs | 2 +- .../Services/RequestRedirectService.cs | 2 +- .../Indexer/AllIndexerController.cs | 2 +- .../Searcher/AllSearcherController.cs | 2 +- .../umbraco/UmbracoWebsite/Maintenance.cshtml | 2 +- .../umbraco/UmbracoWebsite/NoNodes.cshtml | 2 +- .../umbraco/UmbracoWebsite/NotFound.cshtml | 2 +- .../ModelsBuilderConfigExtensions.cs | 2 +- .../DeliveryApi/ApiContentRouteBuilder.cs | 2 +- .../Extensions/StringExtensions.cs | 10 ++-- src/Umbraco.Core/Models/Content.cs | 12 ++--- src/Umbraco.Core/Models/ContentBase.cs | 12 ++--- .../Routing/UmbracoRequestPaths.cs | 4 +- .../BackOfficeExamineSearcher.cs | 2 +- .../LuceneIndexDiagnostics.cs | 2 +- .../DeliveryApi/ApiRichTextElementParser.cs | 2 +- .../Install/FilePermissionHelper.cs | 4 +- .../Logging/Serilog/LoggerConfigExtensions.cs | 2 +- .../Persistence/NPocoSqlExtensions.cs | 4 +- .../Repositories/Implement/UserRepository.cs | 2 +- .../SqlSyntax/SqlSyntaxProviderBase.cs | 2 +- .../ApplicationBuilderExtensions.cs | 2 +- .../Extensions/LinkGeneratorExtensions.cs | 2 +- .../Extensions/UrlHelperExtensions.cs | 4 +- .../.template.config/template.json | 10 ++-- .../UmbracoPackage/UmbracoPackage.csproj | 2 +- .../.template.config/template.json | 10 ++-- .../UmbracoPackageRcl/UmbracoPackage.csproj | 2 +- .../.template.config/template.json | 10 ++-- .../UmbracoProject/UmbracoProject.csproj | 2 +- tests/Directory.Packages.props | 8 ++-- .../UmbracoBuilderExtensions.cs | 2 +- .../ManagementApi/ManagementApiTest.cs | 2 +- .../ExamineExternalIndexSearcherTest.cs | 2 +- .../StringExtensionsTests.cs | 4 +- .../NPocoTests/NPocoSqlTemplateTests.cs | 2 +- .../Umbraco.JsonSchema.csproj | 2 +- version.json | 2 +- 43 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 5f3055125f..9019dfa3da 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - net8.0 + net9.0 Umbraco HQ Umbraco Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy')) diff --git a/Directory.Packages.props b/Directory.Packages.props index 090afcd216..c652e5b7ed 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,32 +7,32 @@ - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -83,7 +83,7 @@ - + diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index aa7e1845f7..7d89c8b97f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -528,7 +528,7 @@ stages: - ${{ if eq(parameters.isNightly, true) }}: pwsh: npm run test --ignore-certificate-errors ${{ else }}: - pwsh: npm run smokeTest --ignore-certificate-errors + pwsh: npm run smokeTest --ignore-certificate-errors displayName: Run Playwright tests continueOnError: true workingDirectory: tests/Umbraco.Tests.AcceptanceTest diff --git a/global.json b/global.json index 391ba3c2a3..f1d8f700f5 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100-preview.5.24307.3", "rollForward": "latestFeature" } } diff --git a/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs b/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs index c08e0be19a..6e96cbed42 100644 --- a/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs +++ b/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs @@ -36,7 +36,7 @@ public class SchemaIdHandler : ISchemaIdHandler // first grab the "non-generic" part of any generic type name (i.e. "PagedViewModel`1" becomes "PagedViewModel") .Split('`').First() // then remove the "ViewModel" postfix from type names - .TrimEnd("ViewModel"); + .TrimEndExact("ViewModel"); private string HandleGenerics(string name, Type type) { diff --git a/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs b/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs index 5969e0a788..8a078d7f0d 100644 --- a/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs +++ b/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs @@ -85,7 +85,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService return null; } - var childrenOf = fetch.TrimStart(childrenOfParameter); + var childrenOf = fetch.TrimStartExact(childrenOfParameter); if (childrenOf.IsNullOrWhiteSpace()) { // this mirrors the current behavior of the Content Delivery API :-) diff --git a/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs b/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs index 882525c8d0..4b9efc03a5 100644 --- a/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs +++ b/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs @@ -66,7 +66,7 @@ internal sealed class RequestRedirectService : RoutingServiceBase, IRequestRedir } // important: redirect URLs are always tracked without trailing slashes - IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEnd("/"), culture); + IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEndExact("/"), culture); IPublishedContent? content = redirectUrl != null ? _apiPublishedContentCache.GetById(redirectUrl.ContentKey) : null; diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs index 768389b56d..6ce4d3b12b 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs @@ -37,7 +37,7 @@ public class AllIndexerController : IndexerControllerBase { IndexResponseModel[] indexes = _examineManager.Indexes .Select(_indexPresentationFactory.Create) - .OrderBy(indexModel => indexModel.Name.TrimEnd("Indexer")).ToArray(); + .OrderBy(indexModel => indexModel.Name.TrimEndExact("Indexer")).ToArray(); var viewModel = new PagedViewModel { Items = indexes.Skip(skip).Take(take), Total = indexes.Length }; return Task.FromResult(viewModel); diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs index 76cd2f639b..4c5189dcaa 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs @@ -30,7 +30,7 @@ public class AllSearcherController : SearcherControllerBase var searchers = new List( _examineManager.RegisteredSearchers.Select(searcher => new SearcherResponse { Name = searcher.Name }) .OrderBy(x => - x.Name.TrimEnd("Searcher"))); // order by name , but strip the "Searcher" from the end if it exists + x.Name.TrimEndExact("Searcher"))); // order by name , but strip the "Searcher" from the end if it exists var viewModel = new PagedViewModel { Items = searchers.Skip(skip).Take(take), diff --git a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml index 94de5f3c52..5c41abf6fa 100644 --- a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml +++ b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml @@ -17,7 +17,7 @@ Website is Under Maintainance - +