From e091e4df0729b4c82bdcf453384ab7e2e6e1ffe9 Mon Sep 17 00:00:00 2001 From: Leo Schick Date: Sat, 6 Jan 2024 13:41:33 +0100 Subject: [PATCH 1/2] upgrade Saas.Permissions links from .NET 7 to .NET 8 --- .../Saas.Permissions.Service_v1.1/Program.cs | 4 ++-- .../Services/GraphAPIService.cs | 2 +- src/Saas.Identity/Saas.Permissions/readme.md | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Program.cs b/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Program.cs index ad222610..ef91420e 100644 --- a/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Program.cs +++ b/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Program.cs @@ -52,7 +52,7 @@ during the deployment of the Identity Framework. } // Add configuration settings data using Options Pattern. -// For more see: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-7.0 +// For more see: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-8.0 builder.Services.Configure( builder.Configuration.GetRequiredSection(PermissionsApiOptions.SectionName)); @@ -148,7 +148,7 @@ void InitializeDevEnvironment() // For local development, use the Secret Manager feature of .NET to store a connection string // and likewise for storing a secret for the permission-api app. - // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows + // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows var appConfigurationconnectionString = builder.Configuration.GetConnectionString("AppConfig") ?? throw new NullReferenceException("App config missing."); diff --git a/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Services/GraphAPIService.cs b/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Services/GraphAPIService.cs index 4b18cee7..6cd1ac90 100644 --- a/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Services/GraphAPIService.cs +++ b/src/Saas.Identity/Saas.Permissions/Saas.Permissions.Service_v1.1/Services/GraphAPIService.cs @@ -16,7 +16,7 @@ public class GraphAPIService( { private readonly ILogger _logger = logger; - // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-7.0 + // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-8.0 private static readonly Action _logError = LoggerMessage.Define( LogLevel.Error, new EventId(1, nameof(GraphAPIService)), diff --git a/src/Saas.Identity/Saas.Permissions/readme.md b/src/Saas.Identity/Saas.Permissions/readme.md index 3777adf3..a64e0be4 100644 --- a/src/Saas.Identity/Saas.Permissions/readme.md +++ b/src/Saas.Identity/Saas.Permissions/readme.md @@ -43,10 +43,10 @@ The SaaS Permissions Service API can be run locally during development, testing To run the API locally, you must have the following installed on your developer machine: - [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (recommended) or [Visual Studio Code](https://code.visualstudio.com/download). -- [.NET 7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) -- [ASP.NET Core 7.0](https://docs.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-7.0) +- [.NET 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) +- [ASP.NET Core 8.0](https://docs.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-8.0) -> *Tip*: .NET 7.0 and ASP.NET Core 7.0 can also be installed as part of the latest version Microsoft Visual Studio 2022. +> *Tip*: .NET 8.0 and ASP.NET Core 8.0 can also be installed as part of the latest version Microsoft Visual Studio 2022. ### Configuration, settings and secrets when running locally @@ -69,7 +69,7 @@ az account show # use this to see if you're already logged into your Azure tanen az login ``` -Code have been added to the [ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-7.0) project leveraging the local Azure CLI environment. You'll find this code in in `Program.cs`: +Code have been added to the [ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-8.0) project leveraging the local Azure CLI environment. You'll find this code in in `Program.cs`: ```csharp if (builder.Environment.IsDevelopment()) @@ -89,7 +89,7 @@ if (builder.Environment.IsDevelopment()) To manage access to Azure App Configuration, securely, we need one more thing. -From your local development environment, you can leverage the Dotnet [Secret Manager](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows), to securely store a `connection string` allowing the local app to access the provisioned Azure App Configuration instance. +From your local development environment, you can leverage the Dotnet [Secret Manager](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows), to securely store a `connection string` allowing the local app to access the provisioned Azure App Configuration instance. This is a two step process: From 46f31bfbefca141f531ce44b11bb4022a900bac6 Mon Sep 17 00:00:00 2001 From: Leo Schick Date: Sun, 7 Jan 2024 10:42:52 +0100 Subject: [PATCH 2/2] upgrade further projects from. NET 7 to .NET 8, removing backup cs projects --- .../Saas.Admin.Service.Tests.csproj | 2 +- src/Saas.Admin/Saas.Admin.Service/Program.cs | 2 +- .../Saas.Application.Web/Program.cs | 2 +- .../Saas - Backup.Application.Web.csproj | 42 ----------------- .../Saas.AspNetCore.Authorization.csproj | 2 +- .../appServiceModuleWithObservability.bicep | 4 +- .../Crypto/ClientAssertionSigningProvider.cs | 2 +- .../PublicX509CertificateDetailProvider.cs | 2 +- .../Provider/SaasApiAuthenticationProvider.cs | 2 +- .../SaasGraphClientCredentialsProvider.cs | 2 +- .../Saas.SignupAdministration.Web/Program.cs | 2 +- ...s - Backup.SignupAdministration.Web.csproj | 45 ------------------- src/TestUtilities/TestUtilities.csproj | 2 +- 13 files changed, 12 insertions(+), 99 deletions(-) delete mode 100644 src/Saas.Application/Saas.Application.Web/Saas - Backup.Application.Web.csproj delete mode 100644 src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Saas - Backup.SignupAdministration.Web.csproj diff --git a/src/Saas.Admin/Saas.Admin.Service.Tests/Saas.Admin.Service.Tests.csproj b/src/Saas.Admin/Saas.Admin.Service.Tests/Saas.Admin.Service.Tests.csproj index 9ceed528..5f5ca277 100644 --- a/src/Saas.Admin/Saas.Admin.Service.Tests/Saas.Admin.Service.Tests.csproj +++ b/src/Saas.Admin/Saas.Admin.Service.Tests/Saas.Admin.Service.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable false diff --git a/src/Saas.Admin/Saas.Admin.Service/Program.cs b/src/Saas.Admin/Saas.Admin.Service/Program.cs index 300776d3..c5c499d6 100644 --- a/src/Saas.Admin/Saas.Admin.Service/Program.cs +++ b/src/Saas.Admin/Saas.Admin.Service/Program.cs @@ -140,7 +140,7 @@ void InitializeDevEnvironment() // For local development, use the Secret Manager feature of .NET to store a connection string // and likewise for storing a secret for the permission-api app. - // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows + // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows var appConfigurationconnectionString = builder.Configuration.GetConnectionString("AppConfig") ?? throw new NullReferenceException("App config missing."); diff --git a/src/Saas.Application/Saas.Application.Web/Program.cs b/src/Saas.Application/Saas.Application.Web/Program.cs index 63029163..abab48b3 100644 --- a/src/Saas.Application/Saas.Application.Web/Program.cs +++ b/src/Saas.Application/Saas.Application.Web/Program.cs @@ -169,7 +169,7 @@ void InitializeDevEnvironment() // For local development, use the Secret Manager feature of .NET to store a connection string // and likewise for storing a secret for the permission-api app. - // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows + // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows var appConfigurationconnectionString = builder.Configuration.GetConnectionString("AppConfig") ?? throw new NullReferenceException("App config missing."); diff --git a/src/Saas.Application/Saas.Application.Web/Saas - Backup.Application.Web.csproj b/src/Saas.Application/Saas.Application.Web/Saas - Backup.Application.Web.csproj deleted file mode 100644 index 112de805..00000000 --- a/src/Saas.Application/Saas.Application.Web/Saas - Backup.Application.Web.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - net7.0 - enable - enable - a45ad9f7-37e3-4dc7-bf2c-9f1f3e449cba - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - diff --git a/src/Saas.Lib/Saas.Authorization/Saas.AspNetCore.Authorization/Saas.AspNetCore.Authorization.csproj b/src/Saas.Lib/Saas.Authorization/Saas.AspNetCore.Authorization/Saas.AspNetCore.Authorization.csproj index 021010d4..cfcf5245 100644 --- a/src/Saas.Lib/Saas.Authorization/Saas.AspNetCore.Authorization/Saas.AspNetCore.Authorization.csproj +++ b/src/Saas.Lib/Saas.Authorization/Saas.AspNetCore.Authorization/Saas.AspNetCore.Authorization.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 True enable diff --git a/src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep b/src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep index 0d67adf2..ab7797b8 100644 --- a/src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep +++ b/src/Saas.Lib/Saas.Bicep.Module/appServiceModuleWithObservability.bicep @@ -68,8 +68,8 @@ resource signupAdministrationWeb 'Microsoft.Web/sites@2022-03-01' = { http20Enabled: true keyVaultReferenceIdentity: userAssignedIdentity.id // Must specify this when using User Assigned Managed Identity. Read here: https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli#access-vaults-with-a-user-assigned-identity detailedErrorLoggingEnabled: true - netFrameworkVersion: 'v7.0' - // linuxFxVersion: 'DOTNETCORE|7.0' + netFrameworkVersion: 'v8.0' + // linuxFxVersion: 'DOTNETCORE|8.0' } } identity: { diff --git a/src/Saas.Lib/Saas.Identity/Crypto/ClientAssertionSigningProvider.cs b/src/Saas.Lib/Saas.Identity/Crypto/ClientAssertionSigningProvider.cs index aa106af5..ffb42bd9 100644 --- a/src/Saas.Lib/Saas.Identity/Crypto/ClientAssertionSigningProvider.cs +++ b/src/Saas.Lib/Saas.Identity/Crypto/ClientAssertionSigningProvider.cs @@ -21,7 +21,7 @@ public class ClientAssertionSigningProvider( { private readonly ILogger _logger = logger; - // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-7.0 + // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-8.0 private static readonly Action _logError = LoggerMessage.Define( LogLevel.Error, new EventId(1, nameof(ClientAssertionSigningProvider)), diff --git a/src/Saas.Lib/Saas.Identity/Crypto/PublicX509CertificateDetailProvider.cs b/src/Saas.Lib/Saas.Identity/Crypto/PublicX509CertificateDetailProvider.cs index c11d9837..9505cd6d 100644 --- a/src/Saas.Lib/Saas.Identity/Crypto/PublicX509CertificateDetailProvider.cs +++ b/src/Saas.Lib/Saas.Identity/Crypto/PublicX509CertificateDetailProvider.cs @@ -15,7 +15,7 @@ public class PublicX509CertificateDetailProvider( { private readonly ILogger _logger = logger; - // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-7.0 + // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-8.0 private static readonly Action _logError = LoggerMessage.Define( LogLevel.Error, new EventId(1, nameof(PublicX509CertificateDetailProvider)), diff --git a/src/Saas.Lib/Saas.Identity/Provider/SaasApiAuthenticationProvider.cs b/src/Saas.Lib/Saas.Identity/Provider/SaasApiAuthenticationProvider.cs index 00f69577..1f3fb391 100644 --- a/src/Saas.Lib/Saas.Identity/Provider/SaasApiAuthenticationProvider.cs +++ b/src/Saas.Lib/Saas.Identity/Provider/SaasApiAuthenticationProvider.cs @@ -15,7 +15,7 @@ public class SaasApiAuthenticationProvider : DelegatingHand { private readonly ILogger _logger; - // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-7.0 + // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-8.0 private static readonly Action _logError = LoggerMessage.Define( LogLevel.Error, new EventId(1, nameof(SaasApiAuthenticationProvider)), diff --git a/src/Saas.Lib/Saas.Identity/Provider/SaasGraphClientCredentialsProvider.cs b/src/Saas.Lib/Saas.Identity/Provider/SaasGraphClientCredentialsProvider.cs index 94b519fe..93928e36 100644 --- a/src/Saas.Lib/Saas.Identity/Provider/SaasGraphClientCredentialsProvider.cs +++ b/src/Saas.Lib/Saas.Identity/Provider/SaasGraphClientCredentialsProvider.cs @@ -14,7 +14,7 @@ public class SaasGraphClientCredentialsProvider( private readonly ILogger _logger = logger; private readonly SaasApiAuthenticationProvider _authProvider = authProvider; - // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-7.0 + // https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-8.0 private static readonly Action _logError = LoggerMessage.Define( LogLevel.Error, new EventId(1, nameof(SaasGraphClientCredentialsProvider)), diff --git a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Program.cs b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Program.cs index c93a0f52..31b0955e 100644 --- a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Program.cs +++ b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Program.cs @@ -192,7 +192,7 @@ void InitializeDevEnvironment() // For local development, use the Secret Manager feature of .NET to store a connection string // and likewise for storing a secret for the permission-api app. - // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows + // https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows var appConfigurationconnectionString = builder.Configuration.GetConnectionString("AppConfig") ?? throw new NullReferenceException("App config missing."); diff --git a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Saas - Backup.SignupAdministration.Web.csproj b/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Saas - Backup.SignupAdministration.Web.csproj deleted file mode 100644 index ec437d07..00000000 --- a/src/Saas.SignupAdministration/Saas.SignupAdministration.Web/Saas - Backup.SignupAdministration.Web.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - net7.0 - false - 7b599cf5-3102-4740-ab34-69dd240f9ea3 - /subscriptions/357c83c2-bed7-4fe7-af6a-95835c6e2d91/resourceGroups/rg-saas-dev-001/providers/microsoft.insights/components/app-provider-dev-001 - enable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/TestUtilities/TestUtilities.csproj b/src/TestUtilities/TestUtilities.csproj index 9f6bd052..3fcb4572 100644 --- a/src/TestUtilities/TestUtilities.csproj +++ b/src/TestUtilities/TestUtilities.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable