From 80c0f394a932c069600942852366f41cd9b0634a Mon Sep 17 00:00:00 2001 From: John Korsnes Date: Wed, 15 Nov 2023 23:05:05 +0100 Subject: [PATCH] Changes minimum .NET version requirements to .NET 7. Adds .NET 8 support +semver:major --- .github/workflows/CI.yml | 2 +- .github/workflows/PreRelease.yml | 6 +++--- .github/workflows/Release.yml | 4 ++-- source/NoCommons.Tests/NoCommons.Tests.csproj | 2 +- source/NoCommons/NoCommons.csproj | 2 +- source/NoCommons/Person/FodselsnummerCalculator.cs | 8 ++------ 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0bc9e7e..636a519 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore source - name: Build diff --git a/.github/workflows/PreRelease.yml b/.github/workflows/PreRelease.yml index 626fea8..7f25e02 100644 --- a/.github/workflows/PreRelease.yml +++ b/.github/workflows/PreRelease.yml @@ -14,15 +14,15 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.11 + uses: gittools/actions/gitversion/setup@v0 with: versionSpec: "5.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.11 + uses: gittools/actions/gitversion/execute@v0 with: useConfigFile: true - name: Pack diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 9b45ff6..6fd94ec 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -17,12 +17,12 @@ jobs: dotnet-version: 6.0.x - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 + uses: gittools/actions/gitversion/setup@v0 with: versionSpec: "5.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.7 + uses: gittools/actions/gitversion/execute@v0 with: useConfigFile: true - name: Pack diff --git a/source/NoCommons.Tests/NoCommons.Tests.csproj b/source/NoCommons.Tests/NoCommons.Tests.csproj index 776c573..5c77dc4 100644 --- a/source/NoCommons.Tests/NoCommons.Tests.csproj +++ b/source/NoCommons.Tests/NoCommons.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0;net7.0 diff --git a/source/NoCommons/NoCommons.csproj b/source/NoCommons/NoCommons.csproj index 80adbf3..ac125b2 100644 --- a/source/NoCommons/NoCommons.csproj +++ b/source/NoCommons/NoCommons.csproj @@ -1,6 +1,6 @@  - netstandard2.0;net46;net45 + net8.0;net7.0 NoCommons NoCommons John Korsnes diff --git a/source/NoCommons/Person/FodselsnummerCalculator.cs b/source/NoCommons/Person/FodselsnummerCalculator.cs index fc0c6e5..c5b9b21 100644 --- a/source/NoCommons/Person/FodselsnummerCalculator.cs +++ b/source/NoCommons/Person/FodselsnummerCalculator.cs @@ -38,11 +38,7 @@ public static Fodselsnummer GetFodselsnummerForDate(DateTime date) * @return A List with Fodelsnummer instances */ public static List GetManyFodselsnummerForDate(DateTime date, bool dNumber = false) - { - if (date == null) - { - throw new ArgumentException(); - } + { var century = GetCentury(date); var dateString = date.ToString("ddMMyy"); @@ -100,4 +96,4 @@ private static List SplitByGender(KJONN kjonn, List