Skip to content

Commit

Permalink
Merge pull request #34 from jonsagara/feature/net9
Browse files Browse the repository at this point in the history
Fixes #33: support both .NET 8 and .NET 9.
  • Loading branch information
jonsagara authored Nov 20, 2024
2 parents edc5a7f + 2c5f5a9 commit 7f3184b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.404",
"version": "9.0.100",
"rollForward": "latestPatch"
}
}
4 changes: 2 additions & 2 deletions src/IdParser.Core.Benchmarks/IdParser.Core.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/IdParser.Core.Client/IdParser.Core.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>ID Parser</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down Expand Up @@ -34,7 +34,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/IdParser.Core.Test/IdParser.Core.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>IdParser.Core.Test</AssemblyTitle>
<Product>IdParser.Core.Test</Product>
Expand All @@ -24,7 +24,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
Expand Down
2 changes: 1 addition & 1 deletion src/IdParser.Core/Barcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private static void ValidateHeaderFormat(string input)
/// <param name="input">The raw PDF417 barcode data</param>
private static AAMVAVersionResult ParseAAMVAVersion(string input)
{
ArgumentNullException.ThrowIfNull(nameof(input));
ArgumentNullException.ThrowIfNull(input);

if (input.Length < 17)
{
Expand Down
14 changes: 9 additions & 5 deletions src/IdParser.Core/IdParser.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

<!-- NuGet -->
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0</AssemblyVersion>
<FileVersion>3.0.0</FileVersion>
<Version>3.1.0</Version>
<AssemblyVersion>3.1.0</AssemblyVersion>
<FileVersion>3.1.0</FileVersion>
<Authors>Connor O'Shea, Jon Sagara</Authors>
<Company />
<PackageId>IdParser.Core</PackageId>
Expand Down Expand Up @@ -40,10 +40,14 @@
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<NoWarn>1591;1701;1702</NoWarn>
</PropertyGroup>
Expand Down

0 comments on commit 7f3184b

Please sign in to comment.