Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for net9.0 #466

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ extends:
version: 6.x

- task: UseDotNet@2
displayName: 'Use .NET 8'
displayName: 'Use .NET 9'
inputs:
version: 8.x
version: 9.x

- task: PowerShell@2
displayName: 'Enable signing'
Expand Down Expand Up @@ -84,7 +84,7 @@ extends:
inputs:
command: test
projects: '$(Build.SourcesDirectory)\Microsoft.Kiota.sln'
arguments: '--configuration $(BuildConfiguration) --no-build --framework net8.0'
arguments: '--configuration $(BuildConfiguration) --no-build --framework net9.0'

- task: EsrpCodeSigning@5
displayName: 'ESRP DLL Strong Name'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand All @@ -35,7 +35,7 @@ jobs:
run: dotnet build ${{ env.solutionName }} --no-restore /p:UseSharedCompilation=false
- name: Test for net462
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal --framework net462
- name: Test for net8.0 and collect coverage
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover --framework net8.0
- name: Test for net9.0 and collect coverage
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover --framework net9.0
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
with: # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
dotnet-version: |
5.x
8.x
9.x
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
Expand All @@ -62,8 +62,8 @@ jobs:
CoverletOutputFormat: "opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
shell: pwsh
run: |
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/coverage.net8.0.opencover.xml,tests/authentication/azure/coverage.net8.0.opencover.xml,tests/http/httpClient/coverage.net8.0.opencover.xml,tests/serialization/json/coverage.net8.0.opencover.xml,tests/serialization/text/coverage.net8.0.opencover.xml,tests/serialization/form/coverage.net8.0.opencover.xml,tests/serialization/multipart/coverage.net8.0.opencover.xml,tests/bundle/coverage.net8.0.opencover.xml"
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/coverage.net9.0.opencover.xml,tests/authentication/azure/coverage.net9.0.opencover.xml,tests/http/httpClient/coverage.net9.0.opencover.xml,tests/serialization/json/coverage.net9.0.opencover.xml,tests/serialization/text/coverage.net9.0.opencover.xml,tests/serialization/form/coverage.net9.0.opencover.xml,tests/serialization/multipart/coverage.net9.0.opencover.xml,tests/bundle/coverage.net9.0.opencover.xml"
dotnet workload restore
dotnet build
dotnet test Microsoft.Kiota.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --framework net8.0
dotnet test Microsoft.Kiota.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --framework net9.0
dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.15.0] - 2024-11-13

### Added

- Added support for `net9.0`.

## [1.14.0] - 2024-11-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- Common default project properties for ALL projects-->
<PropertyGroup>
<VersionPrefix>1.14.0</VersionPrefix>
<VersionPrefix>1.15.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<!-- This is overidden in test projects by setting to true-->
<IsTestProject>false</IsTestProject>
Expand Down
2 changes: 1 addition & 1 deletion src/abstractions/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@

<!-- NET 5 target to be removed on next major version-->
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0' or '$(TargetFramework)'== 'netStandard2.0' or '$(TargetFramework)' == 'netStandard2.1'">
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0,9.0)" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0,10.0)" />
calebkiage marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

<!-- NET 5 target to be removed on next major version-->
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0' or '$(TargetFramework)'== 'netStandard2.0' or '$(TargetFramework)' == 'netStandard2.1'">
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0.1,9.0)" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0.1,10.0)" />
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<!-- suppressed because of this CVE https://github.com/advisories/GHSA-hh2w-p6rv-4g7w
The target application is the one which will resolve the correct version
when the version range is updated to > 8.0.4 in the future, remove the nowarn suppression -->
<PackageReference Include="System.Text.Json" Version="[6.0,9.0)" NoWarn="NU1903" />
<PackageReference Include="System.Text.Json" Version="[6.0,10.0)" NoWarn="NU1903" />
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="[6.0,9.0)" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="[6.0,10.0)" />
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- suppressed because of this CVE https://github.com/advisories/GHSA-hh2w-p6rv-4g7w
The target application is the one which will resolve the correct version
when the version range is updated to > 8.0.4 in the future, remove the nowarn suppression -->
<PackageReference Include="System.Text.Json" Version="[6.0,9.0)" NoWarn="NU1903" />
<PackageReference Include="System.Text.Json" Version="[6.0,10.0)" NoWarn="NU1903" />
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
<TargetFrameworks>net9.0;net462</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<ImplicitUsings>true</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
calebkiage marked this conversation as resolved.
Show resolved Hide resolved
<PublishAot>true</PublishAot>
</PropertyGroup>
<PropertyGroup
Expand Down
Loading