Skip to content

Commit 043124c

Browse files
authored
Modernize frameworks (#100)
Migrate tests and CI to dotnet 6
1 parent ba8fe4d commit 043124c

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: Visual Studio 2019
1+
image: Visual Studio 2022
22
version: '{build}'
33
configuration: Release
44

@@ -12,7 +12,7 @@ before_test:
1212
- dotnet tool install --global coverlet.console --version 1.7.0
1313

1414
test_script:
15-
- ps: coverlet src\ParallelHelper.Test\bin\Release\netcoreapp3.1\ParallelHelper.Test.dll --target "dotnet" --targetargs 'test src\ParallelHelper.Test -c Release -logger:""C:\Program Files\AppVeyor\BuildAgent\dotnetcore\Appveyor.MSBuildLogger.dll"" --no-build' --format opencover --output coverage.xml
15+
- ps: coverlet src\ParallelHelper.Test\bin\Release\net6.0\ParallelHelper.Test.dll --target "dotnet" --targetargs 'test src\ParallelHelper.Test -c Release -logger:""C:\Program Files\AppVeyor\BuildAgent\dotnetcore\Appveyor.MSBuildLogger.dll"" --no-build' --format opencover --output coverage.xml
1616

1717
after_test:
1818
- ps: |

src/ParallelHelper.Test/DiagnosticResultLocation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ public override string ToString() {
3535
return $"{Path}: {Line},{Column}";
3636
}
3737

38-
public static bool operator==(DiagnosticResultLocation left, DiagnosticResultLocation right) {
38+
public static bool operator==(DiagnosticResultLocation? left, DiagnosticResultLocation? right) {
3939
if(left == null) {
4040
return right == null;
4141
}
4242
return left.Equals(right);
4343
}
4444

45-
public static bool operator!=(DiagnosticResultLocation left, DiagnosticResultLocation right) {
45+
public static bool operator!=(DiagnosticResultLocation? left, DiagnosticResultLocation? right) {
4646
return !(left == right);
4747
}
4848
}

src/ParallelHelper.Test/ParallelHelper.Test.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<LangVersion>8.0</LangVersion>
66
<Nullable>enable</Nullable>
7-
<NullableContextOptions>enable</NullableContextOptions> <!-- pre vs 2019.2 -->
87
</PropertyGroup>
98

109
<ItemGroup>

src/ParallelHelper.Test/TestAnalyzerConfigOptionsProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.Diagnostics;
33
using System.Collections.Immutable;
4+
using System.Diagnostics.CodeAnalysis;
45

56
namespace ParallelHelper.Test {
67
/// <summary>
@@ -29,7 +30,7 @@ public TestAnalyzerConfigOptions(ImmutableDictionary<string, string> options) {
2930
_options = options.WithComparers(KeyComparer);
3031
}
3132

32-
public override bool TryGetValue(string key, out string value) {
33+
public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value) {
3334
return _options.TryGetValue(key, out value);
3435
}
3536
}

src/ParallelHelper/ParallelHelper.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<LangVersion>8.0</LangVersion>
88
<Nullable>enable</Nullable>
9-
<NullableContextOptions>enable</NullableContextOptions> <!-- pre vs 2019.2 -->
109
</PropertyGroup>
1110

1211
<PropertyGroup>

0 commit comments

Comments
 (0)