From 848d1a9ddfd6ad8e6cc9c86a764488d7bfa678fb Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 14 Feb 2024 19:17:17 +0000 Subject: [PATCH] Sdk version bump to net8.0 --- .gitignore | 2 ++ global.json | 2 +- src/Yavsc.Abstract/Yavsc.Abstract.csproj | 2 +- src/Yavsc.Server/Yavsc.Server.csproj | 12 +++++----- src/Yavsc/Startup/Startup.cs | 10 ++++---- src/Yavsc/Yavsc.csproj | 30 +++++++++++------------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index bc43d16f..885d09c2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ RSA-Params.json appsettings.*.json omnisharp.json +DataProtection/ + /packages/ /src/Yavsc/Avatars-*/ /src/Yavsc/Blog-*/ diff --git a/global.json b/global.json index b4f05fcf..161898d3 100644 --- a/global.json +++ b/global.json @@ -5,7 +5,7 @@ "tests" ], "sdk": { - "version": "7.0.202", + "version": "8.0.200", "runtime": "dotnet", "architecture": "x64" }, diff --git a/src/Yavsc.Abstract/Yavsc.Abstract.csproj b/src/Yavsc.Abstract/Yavsc.Abstract.csproj index 97f53f0d..4483fe35 100644 --- a/src/Yavsc.Abstract/Yavsc.Abstract.csproj +++ b/src/Yavsc.Abstract/Yavsc.Abstract.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/src/Yavsc.Server/Yavsc.Server.csproj b/src/Yavsc.Server/Yavsc.Server.csproj index a0cf14e5..f8a1ef6a 100644 --- a/src/Yavsc.Server/Yavsc.Server.csproj +++ b/src/Yavsc.Server/Yavsc.Server.csproj @@ -1,18 +1,18 @@ - net7.0 + net8.0 enable enable - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/src/Yavsc/Startup/Startup.cs b/src/Yavsc/Startup/Startup.cs index 01236430..30f76f76 100755 --- a/src/Yavsc/Startup/Startup.cs +++ b/src/Yavsc/Startup/Startup.cs @@ -85,10 +85,10 @@ namespace Yavsc _logger.LogError(JsonConvert.SerializeObject(e.ExceptionObject)); } - public static string ConnectionString { get; set; } - public static GoogleAuthSettings GoogleSettings { get; set; } - public IConfigurationRoot Configuration { get; set; } - public static IConfigurationRoot GoogleWebClientConfiguration { get; set; } + public static string? ConnectionString { get; private set; } + public static GoogleAuthSettings? GoogleSettings { get; private set; } + public IConfigurationRoot Configuration { get; private set; } + public static IConfigurationRoot? GoogleWebClientConfiguration { get; private set; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) @@ -245,7 +245,7 @@ namespace Yavsc { options.ResourcesPath = "Resources"; }); - var datadi = new DirectoryInfo(protectionSettings.GetSection("Keys").GetValue("Dir")); + var datadi = new DirectoryInfo(Configuration["Keys:Dir"]); // Add session related services. services.AddSession(); services.AddDataProtection().PersistKeysToFileSystem(datadi); diff --git a/src/Yavsc/Yavsc.csproj b/src/Yavsc/Yavsc.csproj index df0cfd5b..ea84ae7f 100644 --- a/src/Yavsc/Yavsc.csproj +++ b/src/Yavsc/Yavsc.csproj @@ -1,42 +1,40 @@ - net7.0 + net8.0 enable enable WTFPL - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - - + - - + + - + - + - +