Skip to content

Commit 747f51c

Browse files
authored
Merge pull request #150 from microsoft/feature/net8
feature/net8
2 parents e7d144d + 5485afa commit 747f51c

File tree

9 files changed

+64
-146
lines changed

9 files changed

+64
-146
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ stages:
2929
- job: build
3030
steps:
3131

32-
- task: UseDotNet@2
32+
- task: UseDotNet@2 # needed for ESRP sign
3333
displayName: 'Use .NET 6'
3434
inputs:
3535
version: 6.x
3636

37+
- task: UseDotNet@2
38+
displayName: 'Use .NET 8'
39+
inputs:
40+
version: 8.x
41+
3742
- task: PoliCheck@2
3843
displayName: 'Run PoliCheck "/src"'
3944
inputs:
@@ -75,7 +80,7 @@ stages:
7580
inputs:
7681
command: test
7782
projects: '$(Build.SourcesDirectory)\Microsoft.Kiota.Abstractions.sln'
78-
arguments: '--configuration $(BuildConfiguration) --no-build --framework net6.0'
83+
arguments: '--configuration $(BuildConfiguration) --no-build --framework net8.0'
7984

8085
# CredScan
8186
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3

.devcontainer/Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ name: Build and Test
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ 'main', 'dev', 'feature/*' ]
6+
branches: ["main", "dev", "feature/*"]
77
pull_request:
8-
branches: [ 'main', 'dev' ]
8+
branches: ["main", "dev"]
99

1010
jobs:
1111
build-and-test:
12-
runs-on: windows-latest # Temporary switch to windows till https://github.com/microsoft/vstest/issues/4549 is released in dotnet version after 7.0.400
12+
runs-on: ubuntu-latest
1313
env:
1414
solutionName: Microsoft.Kiota.Abstractions.sln
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Setup .NET
18-
uses: actions/setup-dotnet@v3.0.3
18+
uses: actions/setup-dotnet@v3
1919
with:
20-
dotnet-version: 6.0.x
20+
dotnet-version: 8.x
2121
- name: Initialize CodeQL
2222
uses: github/codeql-action/init@v2
2323
with:

.github/workflows/sonarcloud.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
push:
55
branches:
66
- main
7-
paths-ignore: ['.vscode/**']
7+
paths-ignore: [".vscode/**"]
88
pull_request:
99
types: [opened, synchronize, reopened]
10-
paths-ignore: ['.vscode/**']
10+
paths-ignore: [".vscode/**"]
1111

1212
env:
1313
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -22,7 +22,7 @@ jobs:
2222
- name: Check whether unity activation requests should be done
2323
id: checksecret_job
2424
run: |
25-
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
25+
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
2626
build:
2727
needs: [checksecret]
2828
if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true'
@@ -32,19 +32,17 @@ jobs:
3232
- name: Set up JDK 17
3333
uses: actions/setup-java@v3
3434
with:
35-
distribution: 'adopt'
35+
distribution: "adopt"
3636
java-version: 17
37-
- name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
38-
uses: actions/setup-dotnet@v3
39-
with:
40-
dotnet-version: 5.0.x
4137
- name: Setup .NET
4238
uses: actions/setup-dotnet@v3
43-
with:
44-
dotnet-version: 7.0.x
39+
with: # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
40+
dotnet-version: |
41+
5.x
42+
8.x
4543
- uses: actions/checkout@v4
4644
with:
47-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
45+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
4846
- name: Cache SonarCloud packages
4947
uses: actions/cache@v3
5048
with:
@@ -66,13 +64,13 @@ jobs:
6664
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
6765
- name: Build and analyze
6866
env:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
7068
CollectCoverage: true
71-
CoverletOutputFormat: 'opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
69+
CoverletOutputFormat: "opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
7270
shell: pwsh
7371
run: |
74-
./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="Microsoft.Kiota.Abstractions.Tests/coverage.net6.0.opencover.xml"
72+
./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="Microsoft.Kiota.Abstractions.Tests/coverage.net8.0.opencover.xml"
7573
dotnet workload restore
7674
dotnet build
7775
dotnet test Microsoft.Kiota.Abstractions.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
78-
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
76+
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

.vscode/launch.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
// Use IntelliSense to find out which attributes exist for C# debugging
6-
// Use hover for the description of the existing attributes
7-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8-
"name": ".NET Core Launch (console)",
9-
"type": "coreclr",
10-
"request": "launch",
11-
"preLaunchTask": "build",
12-
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/Microsoft.Kiota.Abstractions.Tests/bin/Debug/net6.0/Microsoft.Kiota.Abstractions.Tests.dll",
14-
"args": [],
15-
"cwd": "${workspaceFolder}/Microsoft.Kiota.Abstractions.Tests",
16-
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17-
"console": "internalConsole",
18-
"stopAtEntry": false
19-
},
20-
{
21-
"name": ".NET Core Attach",
22-
"type": "coreclr",
23-
"request": "attach"
24-
}
25-
]
26-
}
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/Microsoft.Kiota.Abstractions.Tests/bin/Debug/net8.0/Microsoft.Kiota.Abstractions.Tests.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/Microsoft.Kiota.Abstractions.Tests",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17+
"console": "internalConsole",
18+
"stopAtEntry": false
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach"
24+
}
25+
]
26+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.7.2] - 2023-11-14
11+
12+
### Added
13+
14+
- Added support for dotnet 8.
15+
1016
## [1.7.1] - 2023-11-13
1117

1218
### Changed

Microsoft.Kiota.Abstractions.Tests/Microsoft.Kiota.Abstractions.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<IsPackable>false</IsPackable>
5-
<TargetFrameworks>net462;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net462;net8.0</TargetFrameworks>
66
<LangVersion>latest</LangVersion>
77
<OutputType>Library</OutputType>
88
<IsTestProject>true</IsTestProject>
@@ -14,7 +14,8 @@
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1515
</PackageReference>
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
17-
<!-- We need Microsoft.TestPlatform.ObjectModel for net framework execution in linux environments https://github.com/microsoft/vstest/issues/2469-->
17+
<!-- We need Microsoft.TestPlatform.ObjectModel for net framework execution in linux
18+
environments https://github.com/microsoft/vstest/issues/2469-->
1819
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" />
1920
<PackageReference Include="Moq" Version="4.20.69" />
2021
<PackageReference Include="xunit" Version="2.6.1" />
@@ -32,4 +33,4 @@
3233
<ProjectReference Include="..\src\Microsoft.Kiota.Abstractions.csproj" />
3334
</ItemGroup>
3435

35-
</Project>
36+
</Project>

src/Microsoft.Kiota.Abstractions.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
1515
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1616
<Deterministic>true</Deterministic>
17-
<VersionPrefix>1.7.1</VersionPrefix>
17+
<VersionPrefix>1.7.2</VersionPrefix>
1818
<VersionSuffix></VersionSuffix>
1919
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2020
<SignAssembly>false</SignAssembly>
@@ -23,7 +23,6 @@
2323
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2424
<LangVersion>latest</LangVersion>
2525
<Nullable>enable</Nullable>
26-
<IsTrimmable>true</IsTrimmable>
2726
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2827
<!-- Enable this line once we go live to prevent breaking changes -->
2928
<!-- <PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion> -->
@@ -34,16 +33,14 @@
3433
<PackageLicenseFile>LICENSE</PackageLicenseFile>
3534
<PackageReadmeFile>README.md</PackageReadmeFile>
3635
<NoWarn>$(NoWarn);NU5048;NETSDK1138</NoWarn>
36+
</PropertyGroup>
37+
<PropertyGroup Condition="'$(TargetFrameworkVersion)' == 'net5.0'">
3738
<IsTrimmable>true</IsTrimmable>
3839
</PropertyGroup>
3940

4041
<ItemGroup>
41-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
42-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
43-
<PrivateAssets>all</PrivateAssets>
44-
</PackageReference>
4542
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
46-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0,8.0)" />
43+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="[6.0,9.0)" />
4744
<PackageReference Include="Std.UriTemplate" Version="0.0.46" />
4845
</ItemGroup>
4946

0 commit comments

Comments
 (0)