support for .NET 6 (#172)

* support for .NET 6

* install all sdks needed

* CI on RC2
This commit is contained in:
Bruno Garcia 2021-10-31 11:54:34 -04:00 committed by GitHub
parent 5b980b4aba
commit 04684ce686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 5 deletions

View File

@ -22,6 +22,23 @@ jobs:
with:
fetch-depth: 0
- name: Setup .NET SDK (v2.1)
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '2.1.818'
- name: Setup .NET SDK (v3.1)
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '3.1.414'
- name: Setup .NET SDK (v5.0)
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '5.0.402'
- name: Setup .NET SDK (v6.0)
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '6.0.100-rc.2.21505.57'
- name: Get .NET information
run: dotnet --info

View File

@ -44,7 +44,7 @@ namespace Ben.Demystifier.Test
.ToArray())
// Remove Full framework back arrow
.Replace("<---", "");
#if NET5_0 || NETCOREAPP3_1 || NETCOREAPP3_0
#if NETCOREAPP3_0_OR_GREATER
var expected = string.Join("", new[] {
" ---> System.ArgumentException: Value does not fall within the expected range.",
" at async Task Ben.Demystifier.Test.AggregateException.Throw1()",

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net46</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Ben.Demystifier\key.snk</AssemblyOriginatorKeyFile>

View File

@ -31,7 +31,7 @@ namespace Ben.Demystifier.Test
stackTrace = LineEndingsHelper.RemoveLineEndings(stackTrace);
var trace = stackTrace.Split(new[]{Environment.NewLine}, StringSplitOptions.None);
#if NET5_0 || NETCOREAPP3_1 || NETCOREAPP3_0
#if NETCOREAPP3_0_OR_GREATER
Assert.Equal(
new[] {
"System.Exception: Exception of type 'System.Exception' was thrown.",
@ -65,7 +65,7 @@ namespace Ben.Demystifier.Test
stackTrace = LineEndingsHelper.RemoveLineEndings(stackTrace);
trace = stackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
#if NET5_0 || NETCOREAPP3_1 || NETCOREAPP3_0
#if NETCOREAPP3_0_OR_GREATER
Assert.Equal(
new[] {
"System.Exception: Exception of type 'System.Exception' was thrown.",
@ -109,7 +109,12 @@ namespace Ben.Demystifier.Test
Assert.Equal(
new[] {
" at bool System.Threading.ThreadPoolWorkQueue.Dispatch()"},
" at bool System.Threading.ThreadPoolWorkQueue.Dispatch()",
#if NET6_0_OR_GREATER
" at void System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()",
" at void System.Threading.Thread.StartCallback()",
#endif
},
trace);
}
}