From 2eaaeaaaa34f24bf137325f5c7d526d649965822 Mon Sep 17 00:00:00 2001 From: Matiszak Date: Fri, 17 Nov 2023 15:48:02 +0000 Subject: [PATCH] #774 Support for .NET 8 (#777) Authored-by: URBANSKI MATEUSZ --- .devcontainer/Ubuntu22.04/Dockerfile | 2 +- .github/workflows/dotnetcore.yml | 8 ++++++-- .github/workflows/release.yml | 4 ++-- .gitpod.yml | 1 + CycloneDX.Tests/CycloneDX.Tests.csproj | 2 +- CycloneDX/CycloneDX.csproj | 2 +- Dockerfile | 2 +- README.md | 1 + semver.txt | 2 +- 9 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Ubuntu22.04/Dockerfile b/.devcontainer/Ubuntu22.04/Dockerfile index b153ad56..b52d8ecd 100644 --- a/.devcontainer/Ubuntu22.04/Dockerfile +++ b/.devcontainer/Ubuntu22.04/Dockerfile @@ -4,5 +4,5 @@ RUN apt-get install -y --no-install-recommends wget=2.0.1 RUN apt-get install -y --no-install-recommends apt-transport-https=2.5.6 RUN curl -o ./packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb RUN dpkg -i packages-microsoft-prod.deb -RUN apt-get install -y --no-install-recommends dotnet-sdk-7.0=7.0 +RUN apt-get install -y --no-install-recommends dotnet-sdk-8.0=8.0 RUN rm -rf /var/lib/apt/lists/* diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 066bb60e..2f800f6d 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-dotnet@v3.0.3 with: dotnet-version: | - 7.x + 8.x - name: Build run: dotnet build /WarnAsError @@ -43,11 +43,15 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - framework: ['net6.0','net7.0'] + framework: ['net6.0','net7.0', 'net8.0'] timeout-minutes: 30 steps: - uses: actions/checkout@v3.5.2 + - name: Setup dotnet 8 + uses: actions/setup-dotnet@v3.0.3 + with: + dotnet-version: '8.x' - name: Setup dotnet 7 uses: actions/setup-dotnet@v3.0.3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4358f279..481c8efb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,11 +33,11 @@ jobs: uses: actions/setup-dotnet@v3.0.3 with: dotnet-version: | - 7.x + 8.x # The tests should have already been run during the PR workflow, so this is really just a sanity check - name: Tests - run: dotnet test --framework net7.0 + run: dotnet test --framework net8.0 # Build and package everything, including the Docker image - name: Package release diff --git a/.gitpod.yml b/.gitpod.yml index a5e0d30b..2aed0c42 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,6 +10,7 @@ tasks: "$DOTNET_ROOT/dotnet-install.sh" --channel 2.1 --install-dir "$DOTNET_ROOT" "$DOTNET_ROOT/dotnet-install.sh" --channel 6.0 --install-dir "$DOTNET_ROOT" "$DOTNET_ROOT/dotnet-install.sh" --channel 7.0 --install-dir "$DOTNET_ROOT" + "$DOTNET_ROOT/dotnet-install.sh" --channel 8.0 --install-dir "$DOTNET_ROOT" dotnet tool install --global dotnet-reportgenerator-globaltool dotnet restore diff --git a/CycloneDX.Tests/CycloneDX.Tests.csproj b/CycloneDX.Tests/CycloneDX.Tests.csproj index 9e42244f..92a0f3b1 100644 --- a/CycloneDX.Tests/CycloneDX.Tests.csproj +++ b/CycloneDX.Tests/CycloneDX.Tests.csproj @@ -4,7 +4,7 @@ true false - net7.0;net6.0 + net8.0;net7.0;net6.0 latest diff --git a/CycloneDX/CycloneDX.csproj b/CycloneDX/CycloneDX.csproj index f9a26624..bf1f48cd 100644 --- a/CycloneDX/CycloneDX.csproj +++ b/CycloneDX/CycloneDX.csproj @@ -9,7 +9,7 @@ true dotnet-CycloneDX <_SkipUpgradeNetAnalyzersNuGetWarning>true - net7.0;net6.0 + net8.0;net7.0;net6.0 diff --git a/Dockerfile b/Dockerfile index d0eaea6d..2e64d150 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 +FROM mcr.microsoft.com/dotnet/sdk:8.0 ARG VERSION COPY ./nupkgs /tmp/nupkgs/ diff --git a/README.md b/README.md index 1161f9f2..389cceef 100755 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ The CycloneDX module for .NET creates a valid CycloneDX bill-of-material documen This module runs on * .NET 6.0 * .NET 7.0 +* .NET 8.0 This module no longer runs on * .NET Core 2.1 diff --git a/semver.txt b/semver.txt index c8e38b61..10c2c0c3 100755 --- a/semver.txt +++ b/semver.txt @@ -1 +1 @@ -2.9.0 +2.10.0