From 01e6fa191af7ef7d578c98c5f39a6ea152021c5e Mon Sep 17 00:00:00 2001 From: sudokoko Date: Mon, 26 Feb 2024 15:08:48 -0500 Subject: [PATCH] Update to .NET 8 and C# 12 (#952) * Initial SDK and dependency bumps * Bump Pomelo.EntityFrameworkCore.MySql to 8.0.0-beta.2 Should fix the MissingMethodException error in unit tests * Update CI workflow to use .NET 8 * Apply suggested change from compile time warnings * Fix digest tests * Bump dependencies once more * Update xunit * Remove obsolete ISystemClock from TokenAuthHandler * Update dependencies * Add digest debug preprocessors back * Maybe don't break #966 * Bump EF Driver and update various NET7 references * Fix warnings in digest middleware tests --------- Co-authored-by: Slendy --- .dockerignore | 2 + .github/workflows/ci.yml | 6 +-- .run/Development Database.run.xml | 13 ------ .run/Lighthouse API.run.xml | 5 +-- ....run.xml => Lighthouse Gameserver.run.xml} | 5 +-- .run/Lighthouse Website.run.xml | 5 +-- Dockerfile | 8 ++-- .../ProjectLighthouse.Localization.csproj | 2 +- .../ProjectLighthouse.Servers.API.csproj | 2 +- .../Middlewares/DigestMiddleware.cs | 43 +++++++++++-------- ...rojectLighthouse.Servers.GameServer.csproj | 2 +- .../Startup/TokenAuthHandler.cs | 4 +- .../ProjectLighthouse.Servers.Website.csproj | 2 +- ...rojectLighthouse.Tests.GameApiTests.csproj | 14 +++--- .../Unit/Middlewares/DigestMiddlewareTests.cs | 39 +++++++++-------- ...rojectLighthouse.Tests.WebsiteTests.csproj | 20 ++++----- .../ProjectLighthouse.Tests.csproj | 18 ++++---- ProjectLighthouse/ProjectLighthouse.csproj | 20 ++++----- global.json | 2 +- scripts-and-tools/start.sh | 2 +- 20 files changed, 104 insertions(+), 110 deletions(-) delete mode 100644 .run/Development Database.run.xml rename .run/{Lighthouse Game API.run.xml => Lighthouse Gameserver.run.xml} (81%) diff --git a/.dockerignore b/.dockerignore index b319d8fb0..3b3b00903 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ **/data +**/bin +**/obj diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0eae2d2c..a3454563f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,10 +34,10 @@ jobs: if: ${{ matrix.os.database }} run: mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -h 127.0.0.1 -e "CREATE DATABASE ${{ env.DB_DATABASE }};"; - - name: Install .NET 7.0 + - name: Install .NET 8.0 uses: actions/setup-dotnet@v3 with: - dotnet-version: "7.0.x" + dotnet-version: "8.0.x" - name: Compile run: | @@ -59,7 +59,7 @@ jobs: if: ${{ matrix.os.webTest }} continue-on-error: true run: dotnet test -c Release --no-build --logger "trx;LogFileName=${{github.workspace}}/TestResults-${{matrix.os.prettyName}}-WebsiteTests.trx" ProjectLighthouse.Tests.WebsiteTests - + # Attempt to upload results even if test fails. # https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always - name: Upload Test Results diff --git a/.run/Development Database.run.xml b/.run/Development Database.run.xml deleted file mode 100644 index 63dcf5758..000000000 --- a/.run/Development Database.run.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.run/Lighthouse API.run.xml b/.run/Lighthouse API.run.xml index b39956b25..9e5692c3f 100644 --- a/.run/Lighthouse API.run.xml +++ b/.run/Lighthouse API.run.xml @@ -1,6 +1,6 @@ - diff --git a/.run/Lighthouse Game API.run.xml b/.run/Lighthouse Gameserver.run.xml similarity index 81% rename from .run/Lighthouse Game API.run.xml rename to .run/Lighthouse Gameserver.run.xml index 31086fff7..1b31e041b 100644 --- a/.run/Lighthouse Game API.run.xml +++ b/.run/Lighthouse Gameserver.run.xml @@ -1,6 +1,6 @@ - diff --git a/.run/Lighthouse Website.run.xml b/.run/Lighthouse Website.run.xml index 398b8d030..f2d4a4fb6 100644 --- a/.run/Lighthouse Website.run.xml +++ b/.run/Lighthouse Website.run.xml @@ -1,6 +1,6 @@ - diff --git a/Dockerfile b/Dockerfile index 6f758e0fa..bf730b184 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build WORKDIR /ProjectLighthouse COPY *.sln ./ COPY **/*.csproj ./ @@ -13,10 +13,10 @@ RUN dotnet sln list | grep ".csproj" \ RUN dotnet restore COPY . . -RUN dotnet publish -c Release --property:OutputPath=/ProjectLighthouse/publish/ --no-restore +RUN dotnet publish -c Release --property:OutputPath=/ProjectLighthouse/out/ --no-restore # Final running container -FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS final +FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final # Add non-root user RUN addgroup -S lighthouse --gid 1001 && \ @@ -29,7 +29,7 @@ apk add --no-cache icu-libs su-exec tzdata ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false # Copy build files -COPY --from=build /ProjectLighthouse/publish /lighthouse/app +COPY --from=build /ProjectLighthouse/out/publish /lighthouse/app COPY --from=build /ProjectLighthouse/ProjectLighthouse/StaticFiles /lighthouse/temp/StaticFiles COPY --from=build /ProjectLighthouse/scripts-and-tools/docker-entrypoint.sh /lighthouse diff --git a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj index 88e0b5982..49ca9d22a 100644 --- a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj +++ b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable LBPUnion.ProjectLighthouse.Localization diff --git a/ProjectLighthouse.Servers.API/ProjectLighthouse.Servers.API.csproj b/ProjectLighthouse.Servers.API/ProjectLighthouse.Servers.API.csproj index 696fe2778..89585bbb1 100644 --- a/ProjectLighthouse.Servers.API/ProjectLighthouse.Servers.API.csproj +++ b/ProjectLighthouse.Servers.API/ProjectLighthouse.Servers.API.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable LBPUnion.ProjectLighthouse.Servers.API diff --git a/ProjectLighthouse.Servers.GameServer/Middlewares/DigestMiddleware.cs b/ProjectLighthouse.Servers.GameServer/Middlewares/DigestMiddleware.cs index 5bb9e194f..ecb0824c6 100644 --- a/ProjectLighthouse.Servers.GameServer/Middlewares/DigestMiddleware.cs +++ b/ProjectLighthouse.Servers.GameServer/Middlewares/DigestMiddleware.cs @@ -33,8 +33,7 @@ public DigestMiddleware(RequestDelegate next, bool computeDigests) : base(next) public override async Task InvokeAsync(HttpContext context) { // Client digest check. - if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie)) - authCookie = string.Empty; + if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie)) authCookie = string.Empty; string digestPath = context.Request.Path; #if !DEBUG const string url = "/LITTLEBIGPLANETPS3_XML"; @@ -55,8 +54,11 @@ public override async Task InvokeAsync(HttpContext context) excludeBodyFromDigest = true; } - string clientRequestDigest = CryptoHelper.ComputeDigest - (digestPath, authCookie, bodyBytes, ServerConfiguration.Instance.DigestKey.PrimaryDigestKey, excludeBodyFromDigest); + string clientRequestDigest = CryptoHelper.ComputeDigest(digestPath, + authCookie, + bodyBytes, + ServerConfiguration.Instance.DigestKey.PrimaryDigestKey, + excludeBodyFromDigest); // Check the digest we've just calculated against the digest header if the game set the header. They should match. if (context.Request.Headers.TryGetValue(digestHeaderKey, out StringValues sentDigest)) @@ -66,8 +68,11 @@ public override async Task InvokeAsync(HttpContext context) // If we got here, the normal ServerDigestKey failed to validate. Lets try again with the alternate digest key. usedAlternateDigestKey = true; - clientRequestDigest = CryptoHelper.ComputeDigest - (digestPath, authCookie, bodyBytes, ServerConfiguration.Instance.DigestKey.AlternateDigestKey, excludeBodyFromDigest); + clientRequestDigest = CryptoHelper.ComputeDigest(digestPath, + authCookie, + bodyBytes, + ServerConfiguration.Instance.DigestKey.AlternateDigestKey, + excludeBodyFromDigest); if (clientRequestDigest != sentDigest) { #if DEBUG @@ -82,9 +87,10 @@ public override async Task InvokeAsync(HttpContext context) } } } + #if !DEBUG // The game doesn't start sending digests until after the announcement so if it's not one of those requests - // and it doesn't include a digest we need to reject the request + // and it doesn't include a digest we need to reject the request else if (!exemptPathList.Contains(strippedPath)) { context.Response.StatusCode = 403; @@ -92,7 +98,7 @@ public override async Task InvokeAsync(HttpContext context) } #endif - context.Response.Headers.Add("X-Digest-B", clientRequestDigest); + context.Response.Headers.Append("X-Digest-B", clientRequestDigest); context.Request.Body.Position = 0; } @@ -104,19 +110,21 @@ public override async Task InvokeAsync(HttpContext context) await this.next(context); // Handle the request so we can get the server digest hash responseBuffer.Position = 0; - if (responseBuffer.Length > 1000 && context.Request.Headers.AcceptEncoding.Contains("deflate") && (context.Response.ContentType ?? string.Empty).Contains("text/xml")) + if (responseBuffer.Length > 1000 && + context.Request.Headers.AcceptEncoding.Contains("deflate") && + (context.Response.ContentType ?? string.Empty).Contains("text/xml")) { - context.Response.Headers.Add("X-Original-Content-Length", responseBuffer.Length.ToString()); - context.Response.Headers.Add("Vary", "Accept-Encoding"); + context.Response.Headers.Append("X-Original-Content-Length", responseBuffer.Length.ToString()); + context.Response.Headers.Append("Vary", "Accept-Encoding"); MemoryStream resultStream = new(); const int defaultCompressionLevel = 6; await using ZOutputStreamLeaveOpen stream = new(resultStream, defaultCompressionLevel); await stream.WriteAsync(responseBuffer.ToArray()); stream.Finish(); - + resultStream.Position = 0; - context.Response.Headers.Add("Content-Length", resultStream.Length.ToString()); - context.Response.Headers.Add("Content-Encoding", "deflate"); + context.Response.Headers.Append("Content-Length", resultStream.Length.ToString()); + context.Response.Headers.Append("Content-Encoding", "deflate"); responseBuffer.SetLength(0); await resultStream.CopyToAsync(responseBuffer); } @@ -125,7 +133,7 @@ public override async Task InvokeAsync(HttpContext context) string headerName = !context.Response.Headers.ContentLength.HasValue ? "Content-Length" : "X-Original-Content-Length"; - context.Response.Headers.Add(headerName, responseBuffer.Length.ToString()); + context.Response.Headers.Append(headerName, responseBuffer.Length.ToString()); } // Compute the server digest hash. @@ -138,8 +146,9 @@ public override async Task InvokeAsync(HttpContext context) : ServerConfiguration.Instance.DigestKey.PrimaryDigestKey; // Compute the digest for the response. - string serverDigest = CryptoHelper.ComputeDigest(context.Request.Path, authCookie, responseBuffer.ToArray(), digestKey); - context.Response.Headers.Add("X-Digest-A", serverDigest); + string serverDigest = + CryptoHelper.ComputeDigest(context.Request.Path, authCookie, responseBuffer.ToArray(), digestKey); + context.Response.Headers.Append("X-Digest-A", serverDigest); } // Copy the buffered response to the actual response stream. diff --git a/ProjectLighthouse.Servers.GameServer/ProjectLighthouse.Servers.GameServer.csproj b/ProjectLighthouse.Servers.GameServer/ProjectLighthouse.Servers.GameServer.csproj index 54a861865..66d9387ad 100644 --- a/ProjectLighthouse.Servers.GameServer/ProjectLighthouse.Servers.GameServer.csproj +++ b/ProjectLighthouse.Servers.GameServer/ProjectLighthouse.Servers.GameServer.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable LBPUnion.ProjectLighthouse.Servers.GameServer diff --git a/ProjectLighthouse.Servers.GameServer/Startup/TokenAuthHandler.cs b/ProjectLighthouse.Servers.GameServer/Startup/TokenAuthHandler.cs index 3d625f704..02760bce4 100644 --- a/ProjectLighthouse.Servers.GameServer/Startup/TokenAuthHandler.cs +++ b/ProjectLighthouse.Servers.GameServer/Startup/TokenAuthHandler.cs @@ -17,10 +17,8 @@ public TokenAuthHandler ( IOptionsMonitor options, UrlEncoder encoder, - ISystemClock clock, DatabaseContext database - // I said I don't want any damn vegetables (logs) - ) : base(options, new NullLoggerFactory(), encoder, clock) + ) : base(options, new NullLoggerFactory(), encoder) { this.database = database; } diff --git a/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj b/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj index 50691b8b7..9749d85cd 100644 --- a/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj +++ b/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj @@ -1,6 +1,6 @@ - net7.0 + net8.0 enable enable LBPUnion.ProjectLighthouse.Servers.Website diff --git a/ProjectLighthouse.Tests.GameApiTests/ProjectLighthouse.Tests.GameApiTests.csproj b/ProjectLighthouse.Tests.GameApiTests/ProjectLighthouse.Tests.GameApiTests.csproj index 5a2cf1591..1e6cabdb8 100644 --- a/ProjectLighthouse.Tests.GameApiTests/ProjectLighthouse.Tests.GameApiTests.csproj +++ b/ProjectLighthouse.Tests.GameApiTests/ProjectLighthouse.Tests.GameApiTests.csproj @@ -1,22 +1,22 @@ - net7.0 + net8.0 enable false - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/ProjectLighthouse.Tests.GameApiTests/Unit/Middlewares/DigestMiddlewareTests.cs b/ProjectLighthouse.Tests.GameApiTests/Unit/Middlewares/DigestMiddlewareTests.cs index 2df22d7c2..b6b7354ab 100644 --- a/ProjectLighthouse.Tests.GameApiTests/Unit/Middlewares/DigestMiddlewareTests.cs +++ b/ProjectLighthouse.Tests.GameApiTests/Unit/Middlewares/DigestMiddlewareTests.cs @@ -145,8 +145,8 @@ public async Task DigestMiddleware_ShouldUseAlternateDigest_WhenPrimaryDigestInv const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -182,8 +182,8 @@ public async Task DigestMiddleware_ShouldNotReject_WhenRequestingAnnounce() const string expectedClientDigest = "9243acecfa83ac25bdfefe97f5681b439c003f1e"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"]); } @@ -219,8 +219,8 @@ public async Task DigestMiddleware_ShouldCalculate_WhenAuthCookieEmpty() const string expectedClientDigest = "0a06d25662c2d3bab2a767c0c504898df2385e62"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -257,8 +257,8 @@ public async Task DigestMiddleware_ShouldComputeDigestsWithNoBody_WhenDigestsEna const string expectedClientDigest = "df619790a2579a077eae4a6b6864966ff4768723"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -295,8 +295,8 @@ public async Task DigestMiddleware_ShouldComputeDigestsWithBody_WhenDigestsEnabl const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -333,8 +333,8 @@ public async Task DigestMiddleware_ShouldComputeDigestsWithBody_WhenDigestsEnabl const string expectedClientDigest = "3105059f9283773f7982a4d79455bcc97c330f10"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -371,8 +371,8 @@ public async Task DigestMiddleware_ShouldComputeDigestsWithBody_WhenUploading() const string expectedClientDigest = "2e54cd2bc69ff8c1ff85dd3b4f62e0a0e27d9e23"; Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); } @@ -414,18 +414,19 @@ public async Task DigestMiddleware_ShouldCompressResponse_WhenAcceptEncodingHead const string expectedServerDigest = "404e589cafbff7886fe9fc5ee8a5454b57d9cb50"; const string expectedClientDigest = "80714c0936408855d86d47a650320f91895812d0"; const string expectedContentLen = "2000"; + const string expectedContentEncoding = "deflate"; const string expectedCompressedContentLen = "23"; - const string expectedData = "783F4B4C1C053F60143F3F51300A463F500700643F3F"; + const string expectedData = "783F4B4C1C053F60143F3F51300A463F500700643F3F3F"; context.Response.Body.Position = 0; string output = await new StreamReader(context.Response.Body).ReadToEndAsync(); string outputBytes = Convert.ToHexString(Encoding.ASCII.GetBytes(output)); Assert.Equal(expectedCode, context.Response.StatusCode); - Assert.NotEmpty(context.Response.Headers["X-Digest-A"]); - Assert.NotEmpty(context.Response.Headers["X-Digest-B"]); - Assert.NotEmpty(context.Response.Headers["Content-Encoding"]); - Assert.NotEmpty(context.Response.Headers["X-Original-Content-Length"]); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-A", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Digest-B", out _)); + Assert.True(context.Response.Headers.TryGetValue("X-Original-Content-Length", out _)); + Assert.Equal(expectedContentEncoding, context.Response.Headers.ContentEncoding); Assert.Equal(expectedServerDigest, context.Response.Headers["X-Digest-A"][0]); Assert.Equal(expectedClientDigest, context.Response.Headers["X-Digest-B"][0]); Assert.Equal(expectedContentLen, context.Response.Headers["X-Original-Content-Length"][0]); diff --git a/ProjectLighthouse.Tests.WebsiteTests/ProjectLighthouse.Tests.WebsiteTests.csproj b/ProjectLighthouse.Tests.WebsiteTests/ProjectLighthouse.Tests.WebsiteTests.csproj index 59c648315..69bd3e2bc 100644 --- a/ProjectLighthouse.Tests.WebsiteTests/ProjectLighthouse.Tests.WebsiteTests.csproj +++ b/ProjectLighthouse.Tests.WebsiteTests/ProjectLighthouse.Tests.WebsiteTests.csproj @@ -1,24 +1,24 @@ - net7.0 + net8.0 enable false - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -32,7 +32,7 @@ - + diff --git a/ProjectLighthouse.Tests/ProjectLighthouse.Tests.csproj b/ProjectLighthouse.Tests/ProjectLighthouse.Tests.csproj index 3d27a0f86..4205a75a3 100644 --- a/ProjectLighthouse.Tests/ProjectLighthouse.Tests.csproj +++ b/ProjectLighthouse.Tests/ProjectLighthouse.Tests.csproj @@ -5,7 +5,7 @@ false - net7.0 + net8.0 LBPUnion.ProjectLighthouse.Tests @@ -13,15 +13,15 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -29,8 +29,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/ProjectLighthouse/ProjectLighthouse.csproj b/ProjectLighthouse/ProjectLighthouse.csproj index 915110f55..e56b134ac 100644 --- a/ProjectLighthouse/ProjectLighthouse.csproj +++ b/ProjectLighthouse/ProjectLighthouse.csproj @@ -1,7 +1,7 @@ Linux - net7.0 + net8.0 LBPUnion.ProjectLighthouse LBPUnion.ProjectLighthouse Library @@ -15,20 +15,20 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/global.json b/global.json index 7cd6a1f4f..dad2db5ef 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.0", + "version": "8.0.0", "rollForward": "latestMajor", "allowPrerelease": true } diff --git a/scripts-and-tools/start.sh b/scripts-and-tools/start.sh index 64817688c..b004cfd94 100644 --- a/scripts-and-tools/start.sh +++ b/scripts-and-tools/start.sh @@ -9,6 +9,6 @@ cd "$HOME"/data || (echo "Data directory not found, pls create one~" && exit 1) echo "Running..." # Normally this requires ASPNETCORE_URLS but we override that in the configuration -dotnet ../project-lighthouse/ProjectLighthouse.Servers."$1"/bin/Release/net7.0/LBPUnion.ProjectLighthouse.Servers."$1".dll +dotnet ../project-lighthouse/ProjectLighthouse.Servers."$1"/bin/Release/net8.0/LBPUnion.ProjectLighthouse.Servers."$1".dll exit $? # Expose error code from dotnet command \ No newline at end of file