Skip to content

Commit

Permalink
add update to .net 6 (#29)
Browse files Browse the repository at this point in the history
* add update to .net 6

* fix build
  • Loading branch information
BenjaminAbt authored Dec 2, 2021
1 parent 7e4f501 commit cc37016
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 29 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
BuildConfig: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_VERSION: '6.0.100' # https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json

jobs:
build:
Expand All @@ -25,11 +27,18 @@ jobs:
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- uses: dotnet/nbgv@master # https://github.com/dotnet/nbgv
id: nbgv
- name: 'Install .NET SDK'
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Versioning
run: echo ${{ steps.nbgv.outputs.SemVer2 }}
uses: dotnet/nbgv@master
id: nbgv

- name: Version Info
run: |
echo 'SemVer2: ${{ steps.nbgv.outputs.SemVer2 }}'
- name: Build with dotnet
run: dotnet build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand All @@ -15,17 +15,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(OS)' == 'Windows_NT'" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.1" Condition="'$(OS)' == 'Windows_NT'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\MyCSharp.HttpUserAgentParser\MyCSharp.HttpUserAgentParser.csproj" />
</ItemGroup>

<ItemGroup Label="Libraries for comparison">
<PackageReference Include="UAParser" Version="3.1.46" />
<PackageReference Include="DeviceDetector.NET" Version="4.2.0" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="DeviceDetector.NET" Version="4.3.0" />
<PackageReference Include="Ng.UserAgentService" Version="1.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Product>HTTP User Agent Parser Extensions for ASP.NET Core</Product>
<Description>HTTP User Agent Parser Extensions for ASP.NET Core</Description>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Product>HTTP User Agent Parser Extensions for IMemoryCache</Product>
<Description>HTTP User Agent Parser Extensions for IMemoryCache</Description>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand All @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Product>HTTP User Agent Parser</Product>
<Description>Parses user agents for Browser, Platform and Bots.</Description>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand All @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HttpUserAgentPlatformTypeTests
[InlineData(HttpUserAgentPlatformType.Symbian, 9)]
public void TestValue(HttpUserAgentPlatformType type, byte value)
{
type.Should().BeEquivalentTo(value);
((byte)type == value).Should().Be(true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class HttpUserAgentTypeTests
[InlineData(HttpUserAgentType.Robot, 2)]
public void TestValue(HttpUserAgentType type, byte value)
{
type.Should().BeEquivalentTo(value);
((byte)type == value).Should().Be(true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
Expand Down

0 comments on commit cc37016

Please sign in to comment.