From 2ea067f8caf7fbd2b17289699e251764f066dccb Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Tue, 30 Jul 2024 13:51:24 -0700 Subject: [PATCH] Update projects targeting net7.0 to net8.0 (#8619) * Update projects targeting net7.0 to net8.0 After the change to global.json to move to net8.0 we can no longer build net7.0 projects and we need to move them off 7 which is no longer supported. * Fix code for .NET 8 new warnings --- src/dotnet/APIView/APIView/APIView.csproj | 2 +- .../APIViewIntegrationTests/APIViewIntegrationTests.csproj | 2 +- src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj | 2 +- src/dotnet/APIView/APIViewUnitTests/APIViewUnitTests.csproj | 2 +- src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj | 2 +- src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs | 2 +- src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs | 4 ++-- .../SwaggerApiParser/SwaggerApiParser.csproj | 2 +- .../SwaggerApiParserTest/SwaggerApiParserTest.csproj | 2 +- tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj | 2 +- tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dotnet/APIView/APIView/APIView.csproj b/src/dotnet/APIView/APIView/APIView.csproj index c9e8c1ada70..088ac586606 100644 --- a/src/dotnet/APIView/APIView/APIView.csproj +++ b/src/dotnet/APIView/APIView/APIView.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 Exe diff --git a/src/dotnet/APIView/APIViewIntegrationTests/APIViewIntegrationTests.csproj b/src/dotnet/APIView/APIViewIntegrationTests/APIViewIntegrationTests.csproj index 9d2f6320d02..53f915194b3 100644 --- a/src/dotnet/APIView/APIViewIntegrationTests/APIViewIntegrationTests.csproj +++ b/src/dotnet/APIView/APIViewIntegrationTests/APIViewIntegrationTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false true 02d57eb4-c954-413d-8ad3-3534aee82452 diff --git a/src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj b/src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj index e4f50ddc512..10e4e71dcf7 100644 --- a/src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj +++ b/src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/src/dotnet/APIView/APIViewUnitTests/APIViewUnitTests.csproj b/src/dotnet/APIView/APIViewUnitTests/APIViewUnitTests.csproj index 177a85c009b..df243be7aa7 100644 --- a/src/dotnet/APIView/APIViewUnitTests/APIViewUnitTests.csproj +++ b/src/dotnet/APIView/APIViewUnitTests/APIViewUnitTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false true false diff --git a/src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj b/src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj index 7dbb0f2fc34..6fa1b5bb076 100644 --- a/src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj +++ b/src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 APIViewWeb APIViewWeb 79cceff6-d533-4370-a0ee-f3321a343907 diff --git a/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs b/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs index 2f4a27e2a25..459e8981879 100644 --- a/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs +++ b/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs @@ -11,7 +11,7 @@ namespace APIViewWeb.Account { public class TestAuthHandler : AuthenticationHandler { - public TestAuthHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) { } + public TestAuthHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder) { } protected override Task HandleAuthenticateAsync() { diff --git a/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs b/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs index 473331ef184..15b3eb1c649 100644 --- a/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs +++ b/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs @@ -13,8 +13,8 @@ public static void AddPaginationHeader(this HttpResponse response, PaginationHea { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; - response.Headers.Add("Pagination", JsonSerializer.Serialize(header, options)); - response.Headers.Add("Access-Control-Expose-Headers", "Pagination"); + response.Headers.Append("Pagination", JsonSerializer.Serialize(header, options)); + response.Headers.Append("Access-Control-Expose-Headers", "Pagination"); } } } diff --git a/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser/SwaggerApiParser.csproj b/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser/SwaggerApiParser.csproj index 420e137fc84..67cf85a7431 100644 --- a/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser/SwaggerApiParser.csproj +++ b/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser/SwaggerApiParser.csproj @@ -4,7 +4,7 @@ Exe true swaggerAPIParser - net7.0 + net8.0 SwaggerApiParser 1.3.0 Azure.Sdk.Tools.SwaggerApiParser diff --git a/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest/SwaggerApiParserTest.csproj b/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest/SwaggerApiParserTest.csproj index 44c721fbe7b..9c9f88690f9 100644 --- a/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest/SwaggerApiParserTest.csproj +++ b/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest/SwaggerApiParserTest.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable false diff --git a/tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj b/tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj index 168e63ad3d5..6a6b54a27af 100644 --- a/tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj +++ b/tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml b/tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml index 6cd2715d908..0d92ca49964 100644 --- a/tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml +++ b/tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml @@ -90,7 +90,7 @@ deploy: - uses: azureAppService/zipDeploy with: # deploy base folder - artifactFolder: bin/Release/net7.0/win-x86/publish + artifactFolder: bin/Release/net8.0/win-x86/publish # This example uses the env var thats generated by the arm/deploy action. # You can replace it with an existing Azure Resource ID or other # custom environment variable.