Skip to content

Commit

Permalink
Update projects targeting net7.0 to net8.0 (#8619)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
weshaggard authored Jul 30, 2024
1 parent 63a5f57 commit 2ea067f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/dotnet/APIView/APIView/APIView.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<StartupObject />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<UserSecretsId>02d57eb4-c954-413d-8ad3-3534aee82452</UserSecretsId>
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/APIView/APIViewUITests/APIViewUITests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/APIView/APIViewWeb/APIViewWeb.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>APIViewWeb</RootNamespace>
<AssemblyName>APIViewWeb</AssemblyName>
<UserSecretsId>79cceff6-d533-4370-a0ee-f3321a343907</UserSecretsId>
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace APIViewWeb.Account
{
public class TestAuthHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{
public TestAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) { }
public TestAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder) { }

protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<ToolCommandName>swaggerAPIParser</ToolCommandName>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>SwaggerApiParser</RootNamespace>
<VersionPrefix>1.3.0</VersionPrefix>
<AssemblyName>Azure.Sdk.Tools.SwaggerApiParser</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/sdk-ai-bots/AzureSdkQaBot/AzureSdkQaBot.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/sdk-ai-bots/AzureSdkQaBot/teamsapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2ea067f

Please sign in to comment.