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

Changes minimum .NET version requirements to .NET 7. Adds .NET 8 support #19

Merged
merged 1 commit into from
Nov 15, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/PreRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/NoCommons.Tests/NoCommons.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/NoCommons/NoCommons.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net46;net45</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<AssemblyName>NoCommons</AssemblyName>
<PackageId>NoCommons</PackageId>
<Authors>John Korsnes</Authors>
Expand Down
8 changes: 2 additions & 6 deletions source/NoCommons/Person/FodselsnummerCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ public static Fodselsnummer GetFodselsnummerForDate(DateTime date)
* @return A List with Fodelsnummer instances
*/
public static List<Fodselsnummer> GetManyFodselsnummerForDate(DateTime date, bool dNumber = false)
{
if (date == null)
{
throw new ArgumentException();
}
{
var century = GetCentury(date);

var dateString = date.ToString("ddMMyy");
Expand Down Expand Up @@ -100,4 +96,4 @@ private static List<Fodselsnummer> SplitByGender(KJONN kjonn, List<Fodselsnummer
}

}
}
}