From f73d401c6c323ba7aa92675e8929c8811d53730c Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sat, 23 Nov 2024 10:26:33 +0100 Subject: [PATCH 1/6] Refactor Docker configurations and update README for improved setup instructions --- .gitignore | 36 ++------------- README.md | 11 ++++- containers/.env | 4 ++ containers/infrastructure-db.yml | 39 ++++++++++++++++ ...astructure-bare.yml => infrastructure.yml} | 30 ------------- containers/local.env | 2 + scripts/README.md | 44 +++++++++++++++++++ scripts/git-clone-all.sh | 16 +++++++ scripts/git-pull-all.sh | 27 ++++++++++++ scripts/git-push-andcommit-all.sh | 19 ++++++++ 10 files changed, 165 insertions(+), 63 deletions(-) create mode 100644 containers/infrastructure-db.yml rename containers/{infrastructure-bare.yml => infrastructure.yml} (54%) create mode 100644 containers/local.env create mode 100644 scripts/README.md create mode 100644 scripts/git-clone-all.sh create mode 100644 scripts/git-pull-all.sh create mode 100644 scripts/git-push-andcommit-all.sh diff --git a/.gitignore b/.gitignore index 65f178a7..80a047aa 100644 --- a/.gitignore +++ b/.gitignore @@ -10,11 +10,6 @@ *.userosscache *.sln.docstates -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* # Build results [Dd]ebug/ @@ -255,8 +250,6 @@ orleans.codegen.cs # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ -# RIA/Silverlight projects -Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, @@ -301,13 +294,6 @@ node_modules/ # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions # Paket dependency manager .paket/paket.exe @@ -316,15 +302,6 @@ paket-files/ # FAKE - F# Make .fake/ -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# CodeRush personal settings -.cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ @@ -337,14 +314,9 @@ __pycache__/ # Tabs Studio *.tss -# Telerik's JustMock configuration file -*.jmconfig -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs + + # OpenCover UI analysis results OpenCover/ @@ -358,8 +330,6 @@ ASALocalRun/ # NVidia Nsight GPU debugger configuration file *.nvuser -# MFractors (Xamarin productivity tool) working folder -.mfractor/ logs/ @@ -466,3 +436,5 @@ $RECYCLE.BIN/ !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json + +## *.env \ No newline at end of file diff --git a/README.md b/README.md index 5faf79c1..1dc9ab03 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,18 @@ You can use **Docker compose** to setup the infrastructure components just by ru ``` bash cd ./containers # Setup the infrastructure -docker compose -f ./infrastructure-bare.yml --env-file ./.env --project-name genocs up -d +docker compose -f ./infrastructure.yml --env-file ./.env --project-name genocs up -d + +# Use this file only in case you want to setup Redis and Postgres db (no need if you use mongo) +docker compose -f ./infrastructure-db.yml --env-file ./.env --project-name genocs up -d + +# Use this file only in case you want to setup monitoring infrastructure components (Prometheus, Grafana, InfluxDB, Jaeger, Seq) docker compose -f ./infrastructure-monitoring.yml --env-file ./.env --project-name genocs up -d + +# Use this file only in case you want to setup scaling infrastructure components (Fabio, Consul) docker compose -f ./infrastructure-scaling.yml --env-file ./.env --project-name genocs up -d + +# Use this file only in case you want to setup security infrastructure components (Vault) docker compose -f ./infrastructure-security.yml --env-file ./.env --project-name genocs up -d # Use this file only in case you want to setup sqlserver database (no need if you use postgres) diff --git a/containers/.env b/containers/.env index e69de29b..ef73a466 100644 --- a/containers/.env +++ b/containers/.env @@ -0,0 +1,4 @@ +# This file is a placeholder for the .env file that is used by the docker-compose.yml file. +# This file is not used by the application, but is used by the docker-compose.yml file to set environment variables. +# This file should not be modified, but should be copied to a file named .env and modified as needed. +# DO NOT PUT SENSITIVE INFORMATION IN THIS FILE \ No newline at end of file diff --git a/containers/infrastructure-db.yml b/containers/infrastructure-db.yml new file mode 100644 index 00000000..0aac2ef3 --- /dev/null +++ b/containers/infrastructure-db.yml @@ -0,0 +1,39 @@ +services: + + redis: + image: redis + hostname: redis + container_name: redis + ports: + - 6379:6379 + networks: + - genocs + # network_mode: host + volumes: + - redis:/data + + postgres: + image: postgres + hostname: postgres + container_name: postgres + environment: + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + ports: + - 5432:5432 + networks: + - genocs + # network_mode: host + volumes: + - postgres:/var/lib/postgresql/data + +networks: + genocs: + name: genocs-network + driver: bridge + external: true + +volumes: + redis: + driver: local + postgres: + driver: local \ No newline at end of file diff --git a/containers/infrastructure-bare.yml b/containers/infrastructure.yml similarity index 54% rename from containers/infrastructure-bare.yml rename to containers/infrastructure.yml index 31e236da..b13dfbc9 100644 --- a/containers/infrastructure-bare.yml +++ b/containers/infrastructure.yml @@ -25,32 +25,6 @@ services: volumes: - mongodb:/data/db - redis: - image: redis - hostname: redis - container_name: redis - ports: - - 6379:6379 - networks: - - genocs - # network_mode: host - volumes: - - redis:/data - - postgres: - image: postgres - hostname: postgres - container_name: postgres - environment: - - POSTGRES_PASSWORD=mysecretpassword - ports: - - 5432:5432 - networks: - - genocs - # network_mode: host - volumes: - - postgres:/var/lib/postgresql/data - networks: genocs: name: genocs-network @@ -61,7 +35,3 @@ volumes: driver: local rabbitmq: driver: local - redis: - driver: local - postgres: - driver: local \ No newline at end of file diff --git a/containers/local.env b/containers/local.env new file mode 100644 index 00000000..d600fa89 --- /dev/null +++ b/containers/local.env @@ -0,0 +1,2 @@ +# This file is a template for the .env file that is used by the docker-compose.yml file. +POSTGRES_PASSWORD=<> diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 00000000..10099e73 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,44 @@ +# Description + +This folder contains useful script you can use to automate tasks. The scripts are bash or powershell scripts. + +## How to obtain the list of repository on Azure DevOps + +[Repository List](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-5.0) + +```api +https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-5.0 +https://dev.azure.com/genocs/_apis/git/repositories?api-version=5.0 +``` +### List of repositories + + + + +### Window Services + +Following some commands that you can use to handle windows services + +``` cmd +echo To query the available windows services +sc query + +echo To remove the registration +SC DELETE [service_name] +``` + + +## How to clone the repositories at once + +1. Open a bash shell +2. Run the following command + +```bash +./git-clone-all.sh +``` + +3. Checkout develop branch + +```bash +./git-pull-all.sh +``` diff --git a/scripts/git-clone-all.sh b/scripts/git-clone-all.sh new file mode 100644 index 00000000..5f11b236 --- /dev/null +++ b/scripts/git-clone-all.sh @@ -0,0 +1,16 @@ +#!/bin/bash +REPOSITORIES=(genocs-library) + +if [ "$1" = "-p" ] + then + echo ${REPOSITORIES[@]} | sed -E -e 's/[[:blank:]]+/\n/g' | xargs -I {} -n 1 -P 0 sh -c 'printf "========================================================\nCloning repository: {}\n========================================================\n"; git clone https://github.com/Genocs/_git/{}' + else + for REPOSITORY in ${REPOSITORIES[*]} + do + echo ======================================================== + echo Cloning repository: $REPOSITORY + echo ======================================================== + REPO_URL=https://github.com/Genocs/_git/$REPOSITORY + git clone $REPO_URL + done +fi \ No newline at end of file diff --git a/scripts/git-pull-all.sh b/scripts/git-pull-all.sh new file mode 100644 index 00000000..acb2cedd --- /dev/null +++ b/scripts/git-pull-all.sh @@ -0,0 +1,27 @@ +#!/bin/bash +REPOSITORIES=(genocs-library) + +if [ "$1" = "-p" ] + then + echo ${REPOSITORIES[@]} | sed -E -e 's/[[:blank:]]+/\n/g' | xargs -I {} -n 1 -P 0 sh -c 'printf "========================================================\nUpdating repository: {}\n========================================================\n"; git -C {} pull; git -C {} checkout develop; ' + else + for REPOSITORY in ${REPOSITORIES[*]} + do + echo ======================================================== + echo Updating repository: $REPOSITORY + echo ======================================================== + cd $REPOSITORY + git pull + #git checkout master + #git checkout develop + #echo 'clear local branches' + #git remote prune origin --dry-run + #git remote update origin --p + echo 'number of branches' + #echo 'remote:' + git branch -r | wc -l + #echo 'all:' + #git branch --all | wc -l + cd .. + done +fi \ No newline at end of file diff --git a/scripts/git-push-andcommit-all.sh b/scripts/git-push-andcommit-all.sh new file mode 100644 index 00000000..3b059a5c --- /dev/null +++ b/scripts/git-push-andcommit-all.sh @@ -0,0 +1,19 @@ +#!/bin/bash +REPOSITORIES=(genocs-library) + +if [ "$1" = "-p" ] + then + echo ${REPOSITORIES[@]} | sed -E -e 's/[[:blank:]]+/\n/g' | xargs -I {} -n 1 -P 0 sh -c 'printf "========================================================\nPush and commit repository: {}\n========================================================\n"; git add .; git commit -a -m "Updated Packages";git push;' + else + for REPOSITORY in ${REPOSITORIES[*]} + do + echo ======================================================== + echo Add new files, Commit changes and Push on repository: $REPOSITORY + echo ======================================================== + cd $REPOSITORY + git add . + git commit -a -m "Automatic commit" + git push + cd .. + done +fi \ No newline at end of file From 10f3fc8ce182cc062a4cbbe3b3a38964d05cd1b4 Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sat, 23 Nov 2024 21:40:17 +0100 Subject: [PATCH 2/6] Update LangVersion, target frameworks, and refactor code Updated LangVersion to 12.0 in Directory.Build.props. Removed placeholder comments from .env file and added environment variable configurations to local.env. Updated target frameworks to include net9.0 across multiple project files. Added package references for net9.0 in Genocs.Auth.csproj and Genocs.Security.csproj. Removed some endpoints and health checks from HomeController.cs and Program.cs. Added new methods and health check configurations in Extensions.cs. Introduced InvalidConfigurationException class in GenocsException.cs. Added new properties to AzureOptions and ConsoleOptions. Updated GenocsBuilder and IGenocsBuilder to include WebApplicationBuilder. Made minor code improvements and refactoring in various files. Added package reference for OpenTelemetry.Instrumentation.Runtime in Genocs.Tracing.csproj. Updated Genocs.WebApi.Security.csproj and Genocs.WebApi.Swagger.csproj. Removed unused imports and modified Startup.cs in Genocs.APIGateway. Corrected UserSecretsId casing in Genocs.Products.WebApi.csproj and Genocs.SignalR.WebApi.csproj. --- Directory.Build.props | 2 +- containers/.env | 4 - local.env | 10 ++ src/Genocs.Auth/Genocs.Auth.csproj | 7 +- src/Genocs.Common/Genocs.Common.csproj | 2 +- .../Genocs.Core.Demo.Contracts.csproj | 2 +- .../Genocs.Core.Demo.Domain.csproj | 2 +- .../Genocs.Core.Demo.Infrastructure.csproj | 2 +- .../Controllers/HomeController.cs | 10 -- .../Genocs.Core.Demo.WebApi.csproj | 6 +- src/Genocs.Core.Demo.WebApi/Program.cs | 6 +- src/Genocs.Core.Demo.WebApi/appsettings.json | 2 +- .../Genocs.Core.Demo.Worker.csproj | 6 +- .../Genocs.Core.UnitTests.csproj | 2 +- src/Genocs.Core/Builders/Extensions.cs | 103 +++++++++++++++++- src/Genocs.Core/Builders/GenocsBuilder.cs | 25 ++++- src/Genocs.Core/Builders/IGenocsBuilder.cs | 5 +- src/Genocs.Core/Exceptions/GenocsException.cs | 11 ++ src/Genocs.Core/Genocs.Core.csproj | 2 +- src/Genocs.Discovery.Consul/Extensions.cs | 2 +- .../Genocs.Discovery.Consul.csproj | 2 +- .../Genocs.HTTP.RestEase.csproj | 2 +- src/Genocs.HTTP/Genocs.HTTP.csproj | 2 +- .../Genocs.LoadBalancing.Fabio.csproj | 2 +- .../Configurations/AzureOptions.cs | 11 ++ .../Configurations/ConsoleOptions.cs | 10 ++ src/Genocs.Logging/Genocs.Logging.csproj | 2 +- ...enocs.MessageBrokers.Outbox.MongoDB.csproj | 2 +- .../Genocs.MessageBrokers.Outbox.csproj | 2 +- .../Genocs.MessageBrokers.RabbitMQ.csproj | 2 +- .../Genocs.MessageBrokers.csproj | 2 +- src/Genocs.Metrics/Genocs.Metrics.csproj | 2 +- .../Genocs.Monitoring.csproj | 2 +- ...enocs.Persistence.MongoDB.UnitTests.csproj | 2 +- .../Genocs.Persistence.MongoDb.csproj | 2 +- .../Genocs.Persistence.Redis.csproj | 2 +- .../Genocs.QueryBuilder.UnitTests.csproj | 2 +- .../Genocs.Secrets.AzureKeyVault.csproj | 2 +- .../Genocs.Secrets.Vault.csproj | 2 +- src/Genocs.Security/Genocs.Security.csproj | 8 +- .../Genocs.ServiceBusAzure.UnitTests.csproj | 2 +- .../Genocs.ServiceBusAzure.csproj | 2 +- .../Genocs.Tracing.Jaeger.RabbitMQ.csproj | 2 +- src/Genocs.Tracing/Extensions.cs | 40 ++++--- src/Genocs.Tracing/Genocs.Tracing.csproj | 3 +- .../Genocs.WebApi.CQRS.csproj | 2 +- .../Genocs.WebApi.Security.csproj | 6 +- .../Genocs.WebApi.Swagger.csproj | 4 +- src/Genocs.WebApi/Genocs.WebApi.csproj | 2 +- .../Genocs.APIGateway.csproj | 2 +- .../api-gateway/Genocs.APIGateway/Startup.cs | 10 +- .../Genocs.Identities.Application.csproj | 2 +- .../Genocs.Identities.WebApi.csproj | 2 +- .../Genocs.Orders.WebApi.csproj | 2 +- .../Genocs.Products.WebApi.csproj | 6 +- .../Genocs.SignalR.WebApi.csproj | 4 +- 56 files changed, 255 insertions(+), 110 deletions(-) delete mode 100644 containers/.env diff --git a/Directory.Build.props b/Directory.Build.props index 49772f3a..8ef78063 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ True True 6.3.0 - 10.0 + 12.0 Genocs Genocs 2024 LICENSE diff --git a/containers/.env b/containers/.env deleted file mode 100644 index ef73a466..00000000 --- a/containers/.env +++ /dev/null @@ -1,4 +0,0 @@ -# This file is a placeholder for the .env file that is used by the docker-compose.yml file. -# This file is not used by the application, but is used by the docker-compose.yml file to set environment variables. -# This file should not be modified, but should be copied to a file named .env and modified as needed. -# DO NOT PUT SENSITIVE INFORMATION IN THIS FILE \ No newline at end of file diff --git a/local.env b/local.env index e69de29b..14349d0a 100644 --- a/local.env +++ b/local.env @@ -0,0 +1,10 @@ +# Compose supports declaring default environment variables in an environment file named .env placed in the folder docker-compose command is executed from (current working directory). +# Compose expects each line in an env file to be in VAR=VAL format. Lines beginning with # (i.e. comments) are ignored, as are blank lines. +# Note: Values present in the environment at runtime will always override those defined inside the .env file. Similarly, values passed via command-line arguments take precedence as well. + +# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices + +PROJECT_EXTERNAL_DNS_NAME_OR_IP=localhost + +# The docker image version +DOCKER_IMAGE_TAG=6.0.0 diff --git a/src/Genocs.Auth/Genocs.Auth.csproj b/src/Genocs.Auth/Genocs.Auth.csproj index 924792ef..227ce99c 100644 --- a/src/Genocs.Auth/Genocs.Auth.csproj +++ b/src/Genocs.Auth/Genocs.Auth.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Auth Genocs.Auth Genocs.Auth @@ -28,6 +28,11 @@ + + + + + diff --git a/src/Genocs.Common/Genocs.Common.csproj b/src/Genocs.Common/Genocs.Common.csproj index 2ade0ec7..176ac450 100644 --- a/src/Genocs.Common/Genocs.Common.csproj +++ b/src/Genocs.Common/Genocs.Common.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Common Genocs.Common Genocs.Common diff --git a/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj b/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj index 69c454cc..73bbf1c4 100644 --- a/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj +++ b/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj b/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj index 39f3fc59..a610f732 100644 --- a/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj +++ b/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.Core.Demo.Infrastructure/Genocs.Core.Demo.Infrastructure.csproj b/src/Genocs.Core.Demo.Infrastructure/Genocs.Core.Demo.Infrastructure.csproj index dc1d6876..657c487a 100644 --- a/src/Genocs.Core.Demo.Infrastructure/Genocs.Core.Demo.Infrastructure.csproj +++ b/src/Genocs.Core.Demo.Infrastructure/Genocs.Core.Demo.Infrastructure.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.Core.Demo.WebApi/Controllers/HomeController.cs b/src/Genocs.Core.Demo.WebApi/Controllers/HomeController.cs index d9a29280..ae65a0d2 100644 --- a/src/Genocs.Core.Demo.WebApi/Controllers/HomeController.cs +++ b/src/Genocs.Core.Demo.WebApi/Controllers/HomeController.cs @@ -14,16 +14,6 @@ public HomeController(SecretOptions secretSettings) _secretSettings = secretSettings ?? throw new ArgumentNullException(nameof(secretSettings)); } - [HttpGet] - [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] - public IActionResult Get() - => Ok("Genocs Demo WebApi"); - - [HttpGet("ping")] - [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] - public IActionResult Ping() - => Ok("pong"); - [HttpGet("secret")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] public IActionResult GetSecret() diff --git a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj index 8b857be6..fb3a8bc8 100644 --- a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj +++ b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj @@ -1,12 +1,10 @@  - net8.0 + net9.0 false false - genocs - Linux - ..\.. + Genocs diff --git a/src/Genocs.Core.Demo.WebApi/Program.cs b/src/Genocs.Core.Demo.WebApi/Program.cs index e0b37556..8b850a98 100644 --- a/src/Genocs.Core.Demo.WebApi/Program.cs +++ b/src/Genocs.Core.Demo.WebApi/Program.cs @@ -39,8 +39,6 @@ x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); }); -services.AddHealthChecks(); - services.Configure(builder.Configuration.GetSection(SecretOptions.Position)); SecretOptions settings = builder.Configuration.GetOptions(SecretOptions.Position); @@ -86,9 +84,9 @@ // Use it only if you need to authenticate with Firebase // app.UseFirebaseAuthentication(); -app.MapControllers(); +app.MapDefaultEndpoints(); -app.MapHealthChecks("/hc"); +app.MapControllers(); app.Run(); diff --git a/src/Genocs.Core.Demo.WebApi/appsettings.json b/src/Genocs.Core.Demo.WebApi/appsettings.json index 34a70d64..9a13704a 100644 --- a/src/Genocs.Core.Demo.WebApi/appsettings.json +++ b/src/Genocs.Core.Demo.WebApi/appsettings.json @@ -10,7 +10,7 @@ "logger": { "level": "debug", "applicationName": "demo-service", - "excludePaths": [ "/ping", "/metrics" ], + "excludePaths": [ "/health", "/alive" ], "console": { "enabled": true }, diff --git a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj index f3eef8fe..65a73dad 100644 --- a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj +++ b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj @@ -1,12 +1,10 @@  - net8.0 + net9.0 false false - __genocs - Linux - ..\.. + _Genocs diff --git a/src/Genocs.Core.UnitTests/Genocs.Core.UnitTests.csproj b/src/Genocs.Core.UnitTests/Genocs.Core.UnitTests.csproj index 99505860..418db733 100644 --- a/src/Genocs.Core.UnitTests/Genocs.Core.UnitTests.csproj +++ b/src/Genocs.Core.UnitTests/Genocs.Core.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.Core/Builders/Extensions.cs b/src/Genocs.Core/Builders/Extensions.cs index 72fa6c39..c389cd7e 100644 --- a/src/Genocs.Core/Builders/Extensions.cs +++ b/src/Genocs.Core/Builders/Extensions.cs @@ -1,8 +1,13 @@ +using System.Reflection; using Genocs.Common.Configurations; using Genocs.Common.Types; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Diagnostics.HealthChecks; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Diagnostics.HealthChecks; +using Microsoft.Extensions.Hosting; namespace Genocs.Core.Builders; @@ -11,6 +16,13 @@ namespace Genocs.Core.Builders; /// public static class Extensions { + public static IGenocsBuilder AddGenocs(this WebApplicationBuilder builder) + { + // Create the builder + IGenocsBuilder gnxBuilder = GenocsBuilder.Create(builder); + return gnxBuilder; + } + /// /// The Builder. /// @@ -19,12 +31,22 @@ public static class Extensions /// The builder. public static IGenocsBuilder AddGenocs(this IServiceCollection services, IConfiguration? configuration = null) { - var builder = GenocsBuilder.Create(services, configuration); - var settings = builder.GetOptions(AppOptions.Position); - services.AddSingleton(settings); + // Create the builder + IGenocsBuilder builder = GenocsBuilder.Create(services, configuration); + + // Get the application options + AppOptions settings = builder.GetOptions(AppOptions.Position); + builder.Services.AddSingleton(settings); + + // Add the health checks + builder.Services + .AddHealthChecks() + .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); // Add a default liveness check to ensure app is responsive builder.Services.AddMemoryCache(); - services.AddSingleton(); + + builder.Services.AddSingleton(); + if (!settings.DisplayBanner || string.IsNullOrWhiteSpace(settings.Name)) { return builder; @@ -87,4 +109,77 @@ public static TModel GetOptions(this IGenocsBuilder builder, string sect var configuration = serviceProvider.GetRequiredService(); return configuration.GetOptions(sectionName); } + + /// + /// Map default endpoints to setup health checks. + /// + /// The web Application. + /// The WebApplication to be used for chain. + public static IApplicationBuilder MapDefaultEndpoints(this IApplicationBuilder app) + { + // Adding health checks endpoints to applications in non-development environments has security implications. + // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. + + app.UseEndpoints(endpoints => + { + endpoints.MapGet("/", async context => + { + // Get the Entry Assembly Name and Version + // Check performance implications of calling this method + string? assemblyVersion = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.InformationalVersion; + string? serviceVersion = context.RequestServices.GetService()?.Name; + string message = $"Service {serviceVersion ?? assemblyVersion} is running"; + + await context.Response.WriteAsync(context.RequestServices.GetService()?.Name ?? "Service"); + }); + + // All health checks must pass for app to be considered ready to accept traffic after starting + endpoints.MapHealthChecks("/health"); + + // Only health checks tagged with the "live" tag must pass for app to be considered alive + endpoints.MapHealthChecks("/alive", new HealthCheckOptions + { + Predicate = r => r.Tags.Contains("live") + }); + }); + + return app; + } + + /// + /// Map default endpoints to setup health checks. + /// + /// The web Application. + /// The WebApplication to be used for chain. + public static WebApplication MapDefaultEndpoints(this WebApplication app) + { + // Adding health checks endpoints to applications in non-development environments has security implications. + // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. + if (!app.Environment.IsDevelopment()) + { + return app; + } + + app.MapGet("/", async context => + { + // Get the Entry Assembly Name and Version + // Check performance implications of calling this method + string? assemblyVersion = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.InformationalVersion; + string? serviceVersion = context.RequestServices.GetService()?.Name; + string message = $"Service {serviceVersion ?? assemblyVersion} is running"; + + await context.Response.WriteAsync(context.RequestServices.GetService()?.Name ?? message); + }); + + // All health checks must pass for app to be considered ready to accept traffic after starting + app.MapHealthChecks("/health"); + + // Only health checks tagged with the "live" tag must pass for app to be considered alive + app.MapHealthChecks("/alive", new HealthCheckOptions + { + Predicate = r => r.Tags.Contains("live") + }); + + return app; + } } \ No newline at end of file diff --git a/src/Genocs.Core/Builders/GenocsBuilder.cs b/src/Genocs.Core/Builders/GenocsBuilder.cs index 59c5b25b..8be14b99 100644 --- a/src/Genocs.Core/Builders/GenocsBuilder.cs +++ b/src/Genocs.Core/Builders/GenocsBuilder.cs @@ -1,7 +1,8 @@ +using System.Collections.Concurrent; using Genocs.Common.Types; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using System.Collections.Concurrent; namespace Genocs.Core.Builders; @@ -18,16 +19,32 @@ public sealed class GenocsBuilder : IGenocsBuilder /// /// The configuration. /// - public IConfiguration? Configuration { get; } + public IConfiguration? Configuration { get; private set; } + + public WebApplicationBuilder? WebApplicationBuilder { get; private set; } private GenocsBuilder(IServiceCollection services, IConfiguration? configuration) { - _buildActions = new List>(); _services = services; - _services.AddSingleton(new StartupInitializer()); Configuration = configuration; + + _buildActions = new List>(); + _services.AddSingleton(new StartupInitializer()); } + private GenocsBuilder(WebApplicationBuilder builder) + { + WebApplicationBuilder = builder; + Configuration = builder.Configuration; + + _services = builder.Services; + _buildActions = new List>(); + _services.AddSingleton(new StartupInitializer()); + } + + public static IGenocsBuilder Create(WebApplicationBuilder builder) + => new GenocsBuilder(builder); + public static IGenocsBuilder Create(IServiceCollection services, IConfiguration? configuration = null) => new GenocsBuilder(services, configuration); diff --git a/src/Genocs.Core/Builders/IGenocsBuilder.cs b/src/Genocs.Core/Builders/IGenocsBuilder.cs index 5ec0b17e..ca35ed0d 100644 --- a/src/Genocs.Core/Builders/IGenocsBuilder.cs +++ b/src/Genocs.Core/Builders/IGenocsBuilder.cs @@ -1,4 +1,5 @@ using Genocs.Common.Types; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -17,7 +18,9 @@ public interface IGenocsBuilder /// /// Get the configuration. /// - IConfiguration Configuration { get; } + IConfiguration? Configuration { get; } + + WebApplicationBuilder? WebApplicationBuilder { get; } /// /// try to register a service by name. diff --git a/src/Genocs.Core/Exceptions/GenocsException.cs b/src/Genocs.Core/Exceptions/GenocsException.cs index 0c233be5..83b06d02 100644 --- a/src/Genocs.Core/Exceptions/GenocsException.cs +++ b/src/Genocs.Core/Exceptions/GenocsException.cs @@ -45,4 +45,15 @@ public GenocsException(string message, Exception? innerException) { } + + + /// + /// Creates a new object. + /// + /// + public class InvalidConfigurationException(string message) + : GenocsException(message) + { + + } } diff --git a/src/Genocs.Core/Genocs.Core.csproj b/src/Genocs.Core/Genocs.Core.csproj index 32e880bc..ce0380e8 100644 --- a/src/Genocs.Core/Genocs.Core.csproj +++ b/src/Genocs.Core/Genocs.Core.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Core Genocs.Core Genocs.Core diff --git a/src/Genocs.Discovery.Consul/Extensions.cs b/src/Genocs.Discovery.Consul/Extensions.cs index a8a8c511..6a16f2be 100644 --- a/src/Genocs.Discovery.Consul/Extensions.cs +++ b/src/Genocs.Discovery.Consul/Extensions.cs @@ -158,6 +158,6 @@ private static string ParseTime(string value) return DefaultInterval; } - return int.TryParse(value, out var number) ? $"{number}s" : value; + return int.TryParse(value, out int number) ? $"{number}s" : value; } } \ No newline at end of file diff --git a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj index fc01345c..0844d35d 100644 --- a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj +++ b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Discovery.Consul Genocs.Discovery.Consul Genocs.Discovery.Consul diff --git a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj index 1110507f..5e400244 100644 --- a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj +++ b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.HTTP.RestEase Genocs.HTTP.RestEase Genocs.HTTP.RestEase diff --git a/src/Genocs.HTTP/Genocs.HTTP.csproj b/src/Genocs.HTTP/Genocs.HTTP.csproj index f7aa5933..b0e92ce4 100644 --- a/src/Genocs.HTTP/Genocs.HTTP.csproj +++ b/src/Genocs.HTTP/Genocs.HTTP.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.HTTP Genocs.HTTP Genocs.HTTP diff --git a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj index 0f2c4d4b..60f00f0d 100644 --- a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj +++ b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.LoadBalancing.Fabio Genocs.LoadBalancing.Fabio Genocs.LoadBalancing.Fabio diff --git a/src/Genocs.Logging/Configurations/AzureOptions.cs b/src/Genocs.Logging/Configurations/AzureOptions.cs index dc2f326a..81af694c 100644 --- a/src/Genocs.Logging/Configurations/AzureOptions.cs +++ b/src/Genocs.Logging/Configurations/AzureOptions.cs @@ -14,4 +14,15 @@ public class AzureOptions /// The Azure application insights connection string. /// public string? ConnectionString { get; set; } + + + /// + /// It define whether the Azure application insights logger and tracing are enabled or not. + /// + public bool EnableTracing { get; set; } + + /// + /// It define whether the Azure application insights logger and metrics are enabled or not. + /// + public bool EnableMetrics { get; set; } } \ No newline at end of file diff --git a/src/Genocs.Logging/Configurations/ConsoleOptions.cs b/src/Genocs.Logging/Configurations/ConsoleOptions.cs index 4289e516..4112f484 100644 --- a/src/Genocs.Logging/Configurations/ConsoleOptions.cs +++ b/src/Genocs.Logging/Configurations/ConsoleOptions.cs @@ -9,4 +9,14 @@ public class ConsoleOptions /// It define whether the console logger and tracing are enabled or not. /// public bool Enabled { get; set; } + + /// + /// It define whether the console logger and tracing are enabled or not. + /// + public bool EnableTracing { get; set; } + + /// + /// It define whether the console logger and metrics are enabled or not. + /// + public bool EnableMetrics { get; set; } } \ No newline at end of file diff --git a/src/Genocs.Logging/Genocs.Logging.csproj b/src/Genocs.Logging/Genocs.Logging.csproj index 68b271d5..61f0f08c 100644 --- a/src/Genocs.Logging/Genocs.Logging.csproj +++ b/src/Genocs.Logging/Genocs.Logging.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Logging Genocs.Logging Genocs.Logging diff --git a/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj b/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj index 55003bab..b6c4496d 100644 --- a/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj +++ b/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.MessageBrokers.Outbox.MongoDB Genocs.MessageBrokers.Outbox.MongoDB Genocs.MessageBrokers.Outbox.MongoDB diff --git a/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj b/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj index 40a7ffe0..6081bcc0 100644 --- a/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj +++ b/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.MessageBrokers.Outbox Genocs.MessageBrokers.Outbox Genocs.MessageBrokers.Outbox diff --git a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj index 7ebfcf64..4c3e6b35 100644 --- a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj +++ b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.MessageBrokers.RabbitMQ Genocs.MessageBrokers.RabbitMQ Genocs.MessageBrokers.RabbitMQ diff --git a/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj b/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj index 8cb7ec2c..950ffdb8 100644 --- a/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj +++ b/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.MessageBrokers Genocs.MessageBrokers Genocs.MessageBrokers diff --git a/src/Genocs.Metrics/Genocs.Metrics.csproj b/src/Genocs.Metrics/Genocs.Metrics.csproj index fa0e7a00..f759c682 100644 --- a/src/Genocs.Metrics/Genocs.Metrics.csproj +++ b/src/Genocs.Metrics/Genocs.Metrics.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Metrics Genocs.Metrics Genocs.Metrics diff --git a/src/Genocs.Monitoring/Genocs.Monitoring.csproj b/src/Genocs.Monitoring/Genocs.Monitoring.csproj index 0d5d7ff6..c807cc38 100644 --- a/src/Genocs.Monitoring/Genocs.Monitoring.csproj +++ b/src/Genocs.Monitoring/Genocs.Monitoring.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Monitoring Genocs.Monitoring Genocs.Monitoring diff --git a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj index b564f04d..3ec1830f 100644 --- a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj +++ b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false Genocs diff --git a/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj b/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj index 7f9f2b16..8975c3b5 100644 --- a/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj +++ b/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Persistence.MongoDb Genocs.Persistence.MongoDb Genocs.Persistence.MongoDb diff --git a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj index 0b44127c..d31ce577 100644 --- a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj +++ b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Persistence.Redis Genocs.Persistence.Redis Genocs.Persistence.Redis diff --git a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj index e51e8049..18708924 100644 --- a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj +++ b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj b/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj index eda6a48d..8085bb51 100644 --- a/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj +++ b/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Secrets.AzureKeyVault Genocs.Secrets.AzureKeyVault Genocs.Secrets.AzureKeyVault diff --git a/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj b/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj index 61c373ee..aa8cd7cd 100644 --- a/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj +++ b/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Secrets.Vault Genocs.Secrets.Vault Genocs.Secrets.Vault diff --git a/src/Genocs.Security/Genocs.Security.csproj b/src/Genocs.Security/Genocs.Security.csproj index 911dec65..5a94fa22 100644 --- a/src/Genocs.Security/Genocs.Security.csproj +++ b/src/Genocs.Security/Genocs.Security.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Security Genocs.Security Genocs.Security @@ -25,8 +25,12 @@ + + + + - + diff --git a/src/Genocs.ServiceBusAzure.UnitTests/Genocs.ServiceBusAzure.UnitTests.csproj b/src/Genocs.ServiceBusAzure.UnitTests/Genocs.ServiceBusAzure.UnitTests.csproj index bc90559c..9f2b7f07 100644 --- a/src/Genocs.ServiceBusAzure.UnitTests/Genocs.ServiceBusAzure.UnitTests.csproj +++ b/src/Genocs.ServiceBusAzure.UnitTests/Genocs.ServiceBusAzure.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj index c2e209e7..f23a0cee 100644 --- a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj +++ b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.ServiceBusAzure Genocs.ServiceBusAzure Genocs.ServiceBusAzure diff --git a/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj b/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj index 850a07f9..f2410f9f 100644 --- a/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj +++ b/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Tracing.Jaeger.RabbitMQ Genocs.Tracing.Jaeger.RabbitMQ Genocs.Tracing.Jaeger.RabbitMQ diff --git a/src/Genocs.Tracing/Extensions.cs b/src/Genocs.Tracing/Extensions.cs index 9ff0aef4..1f91c164 100644 --- a/src/Genocs.Tracing/Extensions.cs +++ b/src/Genocs.Tracing/Extensions.cs @@ -9,6 +9,7 @@ using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; +using static Genocs.Core.Exceptions.GenocsException; namespace Genocs.Tracing; @@ -25,21 +26,15 @@ public static class Extensions /// The Genocs builder you can use for chain. public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) { - - AppOptions options = builder.GetOptions(AppOptions.Position); + AppOptions appOptions = builder.GetOptions(AppOptions.Position) + ?? throw new InvalidConfigurationException("app config section is missing. AddOpenTelemetry requires those configuration."); // No OpenTelemetryTracing in case of missing ServiceName - if (string.IsNullOrWhiteSpace(options.Service)) + if (string.IsNullOrWhiteSpace(appOptions.Service)) { return builder; } - //builder.Logging.AddOpenTelemetry(logging => - //{ - // logging.IncludeFormattedMessage = true; - // logging.IncludeScopes = true; - //}); - LoggerOptions loggerOptions = builder.GetOptions(LoggerOptions.Position); if (loggerOptions is null) @@ -47,6 +42,13 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) return builder; } + // OpenTelemetry Logging + builder.WebApplicationBuilder?.Logging.AddOpenTelemetry(logging => + { + logging.IncludeFormattedMessage = true; + logging.IncludeScopes = true; + }); + var services = builder.Services; // Set Custom Open telemetry @@ -54,7 +56,10 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) .WithTracing(x => { TracerProviderBuilder provider = x.SetResourceBuilder(ResourceBuilder.CreateDefault() - .AddService(serviceName: options.Service, serviceVersion: options.Version, serviceInstanceId: options.Instance) + .AddService( + serviceName: appOptions.Service, + serviceVersion: appOptions.Version, + serviceInstanceId: appOptions.Instance) .AddTelemetrySdk() .AddEnvironmentVariableDetector()) .AddAspNetCoreInstrumentation() @@ -62,14 +67,14 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) .AddSource("*"); // No OpenTelemetryTracing in case of missing LoggerSettings - if (loggerOptions.Mongo != null && loggerOptions.Mongo.Enabled) + if (loggerOptions.Mongo?.Enabled == true) { // Check for MongoDB config provider.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources"); } // Check for Console config - if (loggerOptions.Console != null && loggerOptions.Console.Enabled) + if (loggerOptions.Console?.Enabled == true && loggerOptions.Console.EnableTracing) { // you should add OpenTelemetry.Exporter.Console NuGet package // Any OTEL supportable exporter can be used here @@ -77,7 +82,7 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) } // Check for Azure ApplicationInsights config - if (loggerOptions.Azure != null && loggerOptions.Azure.Enabled) + if (loggerOptions.Azure?.Enabled == true && loggerOptions.Azure.EnableTracing) { provider.AddAzureMonitorTraceExporter(o => { @@ -87,7 +92,7 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) var jaegerOptions = builder.GetOptions(JaegerOptions.Position); - if (jaegerOptions != null && jaegerOptions.Enabled) + if (jaegerOptions?.Enabled == true) { provider.AddOtlpExporter(o => { @@ -130,13 +135,12 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) provider.AddAspNetCoreInstrumentation(); - // provider.AddRuntimeInstrumentation(); + provider.AddRuntimeInstrumentation(); provider.AddHttpClientInstrumentation(); provider.AddOtlpExporter(); - // Check for Console config - if (loggerOptions.Console != null && loggerOptions.Console.Enabled) + if (loggerOptions.Console?.Enabled == true && loggerOptions.Console.EnableMetrics) { // you should add OpenTelemetry.Exporter.Console NuGet package // Any OTEL supportable exporter can be used here @@ -144,7 +148,7 @@ public static IGenocsBuilder AddOpenTelemetry(this IGenocsBuilder builder) } // Check for Azure ApplicationInsights config - if (loggerOptions.Azure != null && loggerOptions.Azure.Enabled) + if (loggerOptions.Azure?.Enabled == true) { provider.AddAzureMonitorMetricExporter(o => { diff --git a/src/Genocs.Tracing/Genocs.Tracing.csproj b/src/Genocs.Tracing/Genocs.Tracing.csproj index 5c92a7dd..38a8e838 100644 --- a/src/Genocs.Tracing/Genocs.Tracing.csproj +++ b/src/Genocs.Tracing/Genocs.Tracing.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.Tracing Genocs.Tracing Genocs.Tracing @@ -36,6 +36,7 @@ + diff --git a/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj b/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj index f43a5c4c..2b468c9e 100644 --- a/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj +++ b/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.WebApi.CQRS Genocs.WebApi.CQRS Genocs.WebApi.CQRS diff --git a/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj b/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj index e5767a51..69ac85de 100644 --- a/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj +++ b/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.WebApi.Security Genocs.WebApi.Security Genocs.WebApi.Security @@ -25,6 +25,10 @@ + + + + diff --git a/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj b/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj index c794b33e..9356e350 100644 --- a/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj +++ b/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.WebApi.Swagger Genocs.WebApi.Swagger Genocs.WebApi.Swagger @@ -10,7 +10,7 @@ true 5.0.0 Nocco Giovanni Emanuele - aggregate architecture boilerplate ddd ddd-architecture design-patterns docker domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles + openapi open api design-patterns docker domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles README_NUGET.md Aligned to the ecosystem True diff --git a/src/Genocs.WebApi/Genocs.WebApi.csproj b/src/Genocs.WebApi/Genocs.WebApi.csproj index aa0b5a0c..87c1c9d7 100644 --- a/src/Genocs.WebApi/Genocs.WebApi.csproj +++ b/src/Genocs.WebApi/Genocs.WebApi.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 Genocs.WebApi Genocs.WebApi Genocs.WebApi diff --git a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj index 6d8537c6..d6442656 100644 --- a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj +++ b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/apps/api-gateway/Genocs.APIGateway/Startup.cs b/src/apps/api-gateway/Genocs.APIGateway/Startup.cs index 0cb08426..0433677e 100644 --- a/src/apps/api-gateway/Genocs.APIGateway/Startup.cs +++ b/src/apps/api-gateway/Genocs.APIGateway/Startup.cs @@ -1,13 +1,11 @@ using Genocs.APIGateway.Configurations; using Genocs.APIGateway.Framework; using Genocs.Auth; -using Genocs.Common.Configurations; using Genocs.Core.Builders; using Genocs.MessageBrokers.RabbitMQ; using Genocs.Metrics.Prometheus; using Genocs.Security; using Genocs.Tracing; -using Genocs.Tracing.Jaeger; using Genocs.WebApi; using Yarp.ReverseProxy.Forwarder; @@ -83,15 +81,11 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseRouting(); app.UseAuthorization(); + app.MapDefaultEndpoints(); + app.UseEndpoints(endpoints => { - endpoints.MapGet("/", async context => - { - await context.Response.WriteAsync(context.RequestServices.GetService()?.Name ?? "Service"); - }); endpoints.MapReverseProxy(); - - endpoints.MapHealthChecks("/hc"); }); } } diff --git a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj index 9704def8..73c8d0b4 100644 --- a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj +++ b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false diff --git a/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj b/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj index 1a601e87..a8d02249 100644 --- a/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj +++ b/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false _genocs diff --git a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj index 7018f219..6d9f77ab 100644 --- a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj +++ b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false _genocs diff --git a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj index 499fbed1..36502ef3 100644 --- a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj +++ b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj @@ -1,12 +1,10 @@  - net8.0 + net9.0 false false - _genocs - Linux - ..\.. + _Genocs diff --git a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj index 6409fb9b..955122da 100644 --- a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj +++ b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj @@ -4,9 +4,7 @@ net8.0 false false - _genocs - Linux - ..\.. + _Genocs From af78d8d8b790a53a9a73296b1118bdc96cf6721d Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sat, 23 Nov 2024 21:57:23 +0100 Subject: [PATCH 3/6] Update LangVersion, packages, and target frameworks Updated LangVersion to 13.0 in Directory.Build.props. Modified GeneratePackageOnBuild in Genocs.Common.csproj. Updated MassTransit.RabbitMQ to 8.3.2 in WebApi and Worker projects. Added new package references including Microsoft.AspNetCore.Authentication.Certificate 9.0.0 and Polly 8.5.0 across multiple projects. Updated Microsoft.Extensions.Hosting.Abstractions to 9.0.* in Genocs.Discovery.Consul.csproj and Microsoft.Extensions.Http to 9.0.* in Genocs.HTTP.csproj. Updated Polly to 8.5.0 in Genocs.HTTP.csproj and Genocs.MessageBrokers.RabbitMQ.csproj. Updated PackageTags in Genocs.Persistence.Redis.csproj. Changed TargetFramework to net9.0 in Genocs.SignalR.WebApi.csproj. Made minor formatting changes in some project files. --- Directory.Build.props | 2 +- src/Genocs.Common/Genocs.Common.csproj | 2 +- src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj | 4 +++- src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj | 3 ++- src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj | 3 ++- src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj | 1 + src/Genocs.HTTP/Genocs.HTTP.csproj | 4 ++-- .../Genocs.LoadBalancing.Fabio.csproj | 4 ++++ .../Genocs.MessageBrokers.RabbitMQ.csproj | 2 +- .../Genocs.Persistence.Redis.csproj | 2 +- src/Genocs.Tracing/Genocs.Tracing.csproj | 1 + .../api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj | 1 + .../Genocs.Identities.Application.csproj | 4 ++++ .../Genocs.Identities.WebApi.csproj | 4 ++++ .../orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj | 4 ++++ .../Genocs.Products.WebApi/Genocs.Products.WebApi.csproj | 4 ++++ .../Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj | 6 +++++- 17 files changed, 41 insertions(+), 10 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8ef78063..ae739882 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ True True 6.3.0 - 12.0 + 13.0 Genocs Genocs 2024 LICENSE diff --git a/src/Genocs.Common/Genocs.Common.csproj b/src/Genocs.Common/Genocs.Common.csproj index 176ac450..5190a096 100644 --- a/src/Genocs.Common/Genocs.Common.csproj +++ b/src/Genocs.Common/Genocs.Common.csproj @@ -7,7 +7,7 @@ Genocs.Common The Genocs Library - Common components. The common components to build .NET Core projects along with Genocs Library. - true + true 5.0.0 Nocco Giovanni Emanuele microservice microservices solid solid-principles genocs diff --git a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj index fb3a8bc8..69e9caa5 100644 --- a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj +++ b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj @@ -32,7 +32,9 @@ - + + + diff --git a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj index 65a73dad..ccbdaf88 100644 --- a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj +++ b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj @@ -21,8 +21,9 @@ - + + diff --git a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj index 0844d35d..cd0ef5c2 100644 --- a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj +++ b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj @@ -29,6 +29,7 @@ - + + diff --git a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj index 5e400244..17f599ee 100644 --- a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj +++ b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj @@ -32,6 +32,7 @@ + diff --git a/src/Genocs.HTTP/Genocs.HTTP.csproj b/src/Genocs.HTTP/Genocs.HTTP.csproj index b0e92ce4..cdac39a6 100644 --- a/src/Genocs.HTTP/Genocs.HTTP.csproj +++ b/src/Genocs.HTTP/Genocs.HTTP.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj index 60f00f0d..a26304ef 100644 --- a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj +++ b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj @@ -29,4 +29,8 @@ + + + + diff --git a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj index 4c3e6b35..6ff598c4 100644 --- a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj +++ b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj index d31ce577..17788f2b 100644 --- a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj +++ b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj @@ -10,7 +10,7 @@ true 5.0.0 Nocco Giovanni Emanuele - aggregate architecture boilerplate ddd ddd-architecture design-patterns docker domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles + redis rediscache design-patterns docker domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles README_NUGET.md Aligned to the ecosystem True diff --git a/src/Genocs.Tracing/Genocs.Tracing.csproj b/src/Genocs.Tracing/Genocs.Tracing.csproj index 38a8e838..03d93af9 100644 --- a/src/Genocs.Tracing/Genocs.Tracing.csproj +++ b/src/Genocs.Tracing/Genocs.Tracing.csproj @@ -37,6 +37,7 @@ + diff --git a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj index d6442656..86b80540 100644 --- a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj +++ b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj @@ -31,6 +31,7 @@ + diff --git a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj index 73c8d0b4..1e74e716 100644 --- a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj +++ b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj @@ -32,4 +32,8 @@ + + + + diff --git a/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj b/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj index a8d02249..99432ecb 100644 --- a/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj +++ b/src/apps/identity/Genocs.Identities.WebApi/Genocs.Identities.WebApi.csproj @@ -21,4 +21,8 @@ + + + + diff --git a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj index 6d9f77ab..86e86002 100644 --- a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj +++ b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj @@ -47,4 +47,8 @@ + + + + diff --git a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj index 36502ef3..50731432 100644 --- a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj +++ b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj @@ -51,4 +51,8 @@ + + + + diff --git a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj index 955122da..508ad210 100644 --- a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj +++ b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 false false _Genocs @@ -51,4 +51,8 @@ + + + + \ No newline at end of file From 6a1f7e0d896088b91dd20220ae01e7081f78b988 Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sat, 23 Nov 2024 21:59:55 +0100 Subject: [PATCH 4/6] Update Genocs.Core and related package references to version 7.0.0 --- src/Genocs.Auth/Genocs.Auth.csproj | 4 +-- .../Genocs.Core.Demo.Contracts.csproj | 2 +- .../Genocs.Core.Demo.Domain.csproj | 4 +-- .../Genocs.Core.Demo.WebApi.csproj | 18 +++++----- .../Genocs.Core.Demo.Worker.csproj | 6 ++-- src/Genocs.Core/Genocs.Core.csproj | 2 +- .../Genocs.Discovery.Consul.csproj | 4 +-- .../Genocs.HTTP.RestEase.csproj | 8 ++--- src/Genocs.HTTP/Genocs.HTTP.csproj | 2 +- .../Genocs.LoadBalancing.Fabio.csproj | 6 ++-- src/Genocs.Logging/Genocs.Logging.csproj | 2 +- ...enocs.MessageBrokers.Outbox.MongoDB.csproj | 4 +-- .../Genocs.MessageBrokers.Outbox.csproj | 2 +- .../Genocs.MessageBrokers.RabbitMQ.csproj | 2 +- .../Genocs.MessageBrokers.csproj | 2 +- src/Genocs.Metrics/Genocs.Metrics.csproj | 2 +- .../Genocs.Monitoring.csproj | 6 ++-- ...enocs.Persistence.MongoDB.UnitTests.csproj | 2 +- .../Genocs.Persistence.MongoDb.csproj | 2 +- .../Genocs.Persistence.Redis.csproj | 2 +- .../Genocs.QueryBuilder.UnitTests.csproj | 4 +-- .../Genocs.Secrets.AzureKeyVault.csproj | 2 +- .../Genocs.Secrets.Vault.csproj | 2 +- src/Genocs.Security/Genocs.Security.csproj | 2 +- .../Genocs.ServiceBusAzure.csproj | 2 +- .../Genocs.Tracing.Jaeger.RabbitMQ.csproj | 4 +-- src/Genocs.Tracing/Genocs.Tracing.csproj | 6 ++-- .../Genocs.WebApi.CQRS.csproj | 4 +-- .../Genocs.WebApi.Security.csproj | 2 +- .../Genocs.WebApi.Swagger.csproj | 2 +- src/Genocs.WebApi/Genocs.WebApi.csproj | 2 +- .../Genocs.APIGateway.csproj | 18 +++++----- .../Genocs.Identities.Application.csproj | 20 +++++------ .../Genocs.Orders.WebApi.csproj | 32 ++++++++--------- .../Genocs.Products.WebApi.csproj | 32 ++++++++--------- .../Genocs.SignalR.WebApi.csproj | 34 +++++++++---------- 36 files changed, 125 insertions(+), 125 deletions(-) diff --git a/src/Genocs.Auth/Genocs.Auth.csproj b/src/Genocs.Auth/Genocs.Auth.csproj index 227ce99c..20296ed5 100644 --- a/src/Genocs.Auth/Genocs.Auth.csproj +++ b/src/Genocs.Auth/Genocs.Auth.csproj @@ -24,8 +24,8 @@ - - + + diff --git a/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj b/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj index 73bbf1c4..0e849290 100644 --- a/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj +++ b/src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj b/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj index a610f732..2f1181c7 100644 --- a/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj +++ b/src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj index 69e9caa5..2e1f5546 100644 --- a/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj +++ b/src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj @@ -20,15 +20,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj index ccbdaf88..a726e6f8 100644 --- a/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj +++ b/src/Genocs.Core.Demo.Worker/Genocs.Core.Demo.Worker.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/src/Genocs.Core/Genocs.Core.csproj b/src/Genocs.Core/Genocs.Core.csproj index ce0380e8..361e1a50 100644 --- a/src/Genocs.Core/Genocs.Core.csproj +++ b/src/Genocs.Core/Genocs.Core.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj index cd0ef5c2..9055f004 100644 --- a/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj +++ b/src/Genocs.Discovery.Consul/Genocs.Discovery.Consul.csproj @@ -24,8 +24,8 @@ - - + + diff --git a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj index 17f599ee..a6aacfd6 100644 --- a/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj +++ b/src/Genocs.HTTP.RestEase/Genocs.HTTP.RestEase.csproj @@ -25,10 +25,10 @@ - - - - + + + + diff --git a/src/Genocs.HTTP/Genocs.HTTP.csproj b/src/Genocs.HTTP/Genocs.HTTP.csproj index cdac39a6..001692e7 100644 --- a/src/Genocs.HTTP/Genocs.HTTP.csproj +++ b/src/Genocs.HTTP/Genocs.HTTP.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj index a26304ef..d81ff3b4 100644 --- a/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj +++ b/src/Genocs.LoadBalancing.Fabio/Genocs.LoadBalancing.Fabio.csproj @@ -24,9 +24,9 @@ - - - + + + diff --git a/src/Genocs.Logging/Genocs.Logging.csproj b/src/Genocs.Logging/Genocs.Logging.csproj index 61f0f08c..5412bc16 100644 --- a/src/Genocs.Logging/Genocs.Logging.csproj +++ b/src/Genocs.Logging/Genocs.Logging.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj b/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj index b6c4496d..e06755d9 100644 --- a/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj +++ b/src/Genocs.MessageBrokers.Outbox.MongoDB/Genocs.MessageBrokers.Outbox.MongoDB.csproj @@ -23,8 +23,8 @@ - - + + diff --git a/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj b/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj index 6081bcc0..606ef8c7 100644 --- a/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj +++ b/src/Genocs.MessageBrokers.Outbox/Genocs.MessageBrokers.Outbox.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj index 6ff598c4..a36b28d6 100644 --- a/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj +++ b/src/Genocs.MessageBrokers.RabbitMQ/Genocs.MessageBrokers.RabbitMQ.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj b/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj index 950ffdb8..69fde5a1 100644 --- a/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj +++ b/src/Genocs.MessageBrokers/Genocs.MessageBrokers.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Metrics/Genocs.Metrics.csproj b/src/Genocs.Metrics/Genocs.Metrics.csproj index f759c682..348ea903 100644 --- a/src/Genocs.Metrics/Genocs.Metrics.csproj +++ b/src/Genocs.Metrics/Genocs.Metrics.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Monitoring/Genocs.Monitoring.csproj b/src/Genocs.Monitoring/Genocs.Monitoring.csproj index c807cc38..ab4afe99 100644 --- a/src/Genocs.Monitoring/Genocs.Monitoring.csproj +++ b/src/Genocs.Monitoring/Genocs.Monitoring.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj index 3ec1830f..84de8f4e 100644 --- a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj +++ b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj b/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj index 8975c3b5..f02a1ef6 100644 --- a/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj +++ b/src/Genocs.Persistence.MongoDb/Genocs.Persistence.MongoDb.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj index 17788f2b..2ef362fc 100644 --- a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj +++ b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj index 18708924..9106efd6 100644 --- a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj +++ b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj b/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj index 8085bb51..74abf1cc 100644 --- a/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj +++ b/src/Genocs.Secrets.AzureKeyVault/Genocs.Secrets.AzureKeyVault.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj b/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj index aa8cd7cd..4f6bc8d5 100644 --- a/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj +++ b/src/Genocs.Secrets.Vault/Genocs.Secrets.Vault.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Security/Genocs.Security.csproj b/src/Genocs.Security/Genocs.Security.csproj index 5a94fa22..d92a361f 100644 --- a/src/Genocs.Security/Genocs.Security.csproj +++ b/src/Genocs.Security/Genocs.Security.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj index f23a0cee..2993664b 100644 --- a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj +++ b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj b/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj index f2410f9f..97844c73 100644 --- a/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj +++ b/src/Genocs.Tracing.Jaeger.RabbitMQ/Genocs.Tracing.Jaeger.RabbitMQ.csproj @@ -23,8 +23,8 @@ - - + + diff --git a/src/Genocs.Tracing/Genocs.Tracing.csproj b/src/Genocs.Tracing/Genocs.Tracing.csproj index 03d93af9..58890d57 100644 --- a/src/Genocs.Tracing/Genocs.Tracing.csproj +++ b/src/Genocs.Tracing/Genocs.Tracing.csproj @@ -24,9 +24,9 @@ - - - + + + diff --git a/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj b/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj index 2b468c9e..d48a85c7 100644 --- a/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj +++ b/src/Genocs.WebApi.CQRS/Genocs.WebApi.CQRS.csproj @@ -23,8 +23,8 @@ - - + + diff --git a/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj b/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj index 69ac85de..6ad6611d 100644 --- a/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj +++ b/src/Genocs.WebApi.Security/Genocs.WebApi.Security.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj b/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj index 9356e350..78b7f717 100644 --- a/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj +++ b/src/Genocs.WebApi.Swagger/Genocs.WebApi.Swagger.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/Genocs.WebApi/Genocs.WebApi.csproj b/src/Genocs.WebApi/Genocs.WebApi.csproj index 87c1c9d7..ac93a765 100644 --- a/src/Genocs.WebApi/Genocs.WebApi.csproj +++ b/src/Genocs.WebApi/Genocs.WebApi.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj index 86b80540..99064554 100644 --- a/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj +++ b/src/apps/api-gateway/Genocs.APIGateway/Genocs.APIGateway.csproj @@ -19,15 +19,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj index 1e74e716..4e3c8dca 100644 --- a/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj +++ b/src/apps/identity/Genocs.Identities.Application/Genocs.Identities.Application.csproj @@ -20,16 +20,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj index 86e86002..f161c38d 100644 --- a/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj +++ b/src/apps/orders/Genocs.Orders.WebApi/Genocs.Orders.WebApi.csproj @@ -29,22 +29,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj index 50731432..d54c84eb 100644 --- a/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj +++ b/src/apps/products/Genocs.Products.WebApi/Genocs.Products.WebApi.csproj @@ -28,22 +28,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj index 508ad210..cd7c71e7 100644 --- a/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj +++ b/src/apps/signalr/Genocs.SignalR.WebApi/Genocs.SignalR.WebApi.csproj @@ -29,23 +29,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + From 307877e76d1eb89ec646a5883cea52b305272bbf Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sun, 24 Nov 2024 09:28:11 +0100 Subject: [PATCH 5/6] Update GitHub workflows and documentation for .NET 9 support --- .github/workflows/build_and_test.yml | 6 +++--- .github/workflows/dockerhub-publish.yml | 2 +- .github/workflows/nuget-publish.yml | 4 ++-- README.md | 2 +- src/Genocs.Auth/README_NUGET.md | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f18640fa..972af332 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,9 +2,9 @@ name: Build test and pack on: push: - branches: [main, develop] + branches: [master, develop] pull_request: - branches: [main, develop] + branches: [master, develop] jobs: build: @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/dockerhub-publish.yml b/.github/workflows/dockerhub-publish.yml index e8d987f2..f0883407 100644 --- a/.github/workflows/dockerhub-publish.yml +++ b/.github/workflows/dockerhub-publish.yml @@ -30,7 +30,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index 7e70f358..160a6a54 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -13,7 +13,7 @@ on: description: "Packages Version" # Default value if no value is explicitly provided - default: "6.2.0" + default: "7.0.0" # Input has to be provided for the workflow to run required: true @@ -30,7 +30,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore diff --git a/README.md b/README.md index 1dc9ab03..e493e8c7 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ # Genocs .NET library -This repo contains a set of libraries to build LOB (Line Of Business) applications. The library is open source and built to be PRODUCTION READY. The library is built on top of .NET8, it is designed and maintained by Genocs. +This repo contains a set of libraries to build LOB (Line Of Business) applications. The library is open source and built to be PRODUCTION READY. The library is built on top of .NET9, it is designed and maintained by Genocs. Packages are available on [NuGet Genocs](https://www.nuget.org/profiles/gioema_nocco). diff --git a/src/Genocs.Auth/README_NUGET.md b/src/Genocs.Auth/README_NUGET.md index 86096c0e..893e23ec 100644 --- a/src/Genocs.Auth/README_NUGET.md +++ b/src/Genocs.Auth/README_NUGET.md @@ -3,7 +3,7 @@ This package contains a set of functionalities to handling authorization logic as JWT. First of all I have to say thanks to devmentors. -The libraries are built using net8, net7, net6. +The libraries are built using .NET9, .NET8, .NET7, .NET6. ## Description From 766bec0cfe96a169280fe198ceed6c8917b59df3 Mon Sep 17 00:00:00 2001 From: Nocco Giovanni Emanuele Date: Sun, 24 Nov 2024 09:52:58 +0100 Subject: [PATCH 6/6] Update package versions and remove unused import Updated various project files to use version 9.0.* of several Microsoft.Extensions packages, replacing older versions. Specifically, updated: - `Genocs.Persistence.MongoDB.UnitTests.csproj` to use `Microsoft.Extensions.Configuration.UserSecrets` 9.0.0 and `Microsoft.Extensions.Options` 9.0.0. - `Genocs.Persistence.Redis.csproj` to use `Microsoft.Extensions.Caching.StackExchangeRedis` 9.0.*. - `Genocs.QueryBuilder.UnitTests.csproj` to use `Microsoft.CodeAnalysis.NetAnalyzers` 9.0.*. - `Genocs.ServiceBusAzure.csproj` to use `Microsoft.Extensions.Logging.Abstractions` 9.0.0 and `Microsoft.Extensions.Options` 9.0.0. Additionally, removed the `Genocs.Tracing.Jaeger` namespace import from `Program.cs`. --- .../Genocs.Persistence.MongoDB.UnitTests.csproj | 4 ++-- src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj | 2 +- .../Genocs.QueryBuilder.UnitTests.csproj | 2 +- src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj | 4 ++-- src/apps/signalr/Genocs.SignalR.WebApi/Program.cs | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj index 84de8f4e..a4380106 100644 --- a/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj +++ b/src/Genocs.Persistence.MongoDb.UnitTests/Genocs.Persistence.MongoDB.UnitTests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj index 2ef362fc..f653099f 100644 --- a/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj +++ b/src/Genocs.Persistence.Redis/Genocs.Persistence.Redis.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj index 9106efd6..24a8d342 100644 --- a/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj +++ b/src/Genocs.QueryBuilder.UnitTests/Genocs.QueryBuilder.UnitTests.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj index 2993664b..a9af0299 100644 --- a/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj +++ b/src/Genocs.ServiceBusAzure/Genocs.ServiceBusAzure.csproj @@ -27,8 +27,8 @@ - - + + diff --git a/src/apps/signalr/Genocs.SignalR.WebApi/Program.cs b/src/apps/signalr/Genocs.SignalR.WebApi/Program.cs index b0406060..816d944c 100644 --- a/src/apps/signalr/Genocs.SignalR.WebApi/Program.cs +++ b/src/apps/signalr/Genocs.SignalR.WebApi/Program.cs @@ -16,7 +16,6 @@ using Genocs.SignalR.WebApi.Hubs; using Genocs.SignalR.WebApi.Services; using Genocs.Tracing; -using Genocs.Tracing.Jaeger; using Genocs.WebApi; using Genocs.WebApi.CQRS; using Genocs.WebApi.Swagger;