From 181c6c4027a96d99620e49a9226e643e4080e5f1 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Wed, 26 Jan 2022 11:39:55 -0500 Subject: [PATCH 1/4] Update dependencies --- Refit.Tests/InterfaceStubGenerator.cs | 8 ++++---- Refit.Tests/Refit.Tests.csproj | 11 +++++------ Refit/Refit.csproj | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Refit.Tests/InterfaceStubGenerator.cs b/Refit.Tests/InterfaceStubGenerator.cs index adfc35bfb..153dfb302 100644 --- a/Refit.Tests/InterfaceStubGenerator.cs +++ b/Refit.Tests/InterfaceStubGenerator.cs @@ -30,11 +30,11 @@ public class InterfaceStubGeneratorTests static InterfaceStubGeneratorTests() { -#if NET5_0 +#if NET5_0_OR_GREATER ReferenceAssemblies = ReferenceAssemblies.Net.Net50; #else ReferenceAssemblies = ReferenceAssemblies.Default - .AddPackages(ImmutableArray.Create(new PackageIdentity("System.Text.Json", "5.0.1"))); + .AddPackages(ImmutableArray.Create(new PackageIdentity("System.Text.Json", "6.0.1"))); #endif #if NET461 @@ -64,7 +64,7 @@ public void GenerateInterfaceStubsSmokeTest() Assert.Empty(diags.Where(d => d.Severity == DiagnosticSeverity.Error)); var rundriver = driver.RunGeneratorsAndUpdateCompilation(inputCompilation, out var outputCompiliation, out var diagnostics); - + var runResult = rundriver.GetRunResult(); var generated = runResult.Results[0]; @@ -858,7 +858,7 @@ public interface IBoringCrudApi where T : class Task ReadOne(TKey key); [Put("/{key}")] - Task Update(TKey key, [Body]T payload); + Task Update(TKey key, [Body] T payload); [Delete("/{key}")] Task Delete(TKey key); diff --git a/Refit.Tests/Refit.Tests.csproj b/Refit.Tests/Refit.Tests.csproj index 8f40acb3d..42554e180 100644 --- a/Refit.Tests/Refit.Tests.csproj +++ b/Refit.Tests/Refit.Tests.csproj @@ -1,9 +1,9 @@  - + - net5.0;netcoreapp2.1;netcoreapp3.1;net461 + net6.0;netcoreapp3.1;net461 false @@ -18,13 +18,12 @@ - + - + @@ -32,5 +31,5 @@ - + diff --git a/Refit/Refit.csproj b/Refit/Refit.csproj index d7981364e..cd645a1eb 100644 --- a/Refit/Refit.csproj +++ b/Refit/Refit.csproj @@ -9,8 +9,8 @@ - - + + From 8757eeb9bd3d96c83c9fc62d5721a44a9998095c Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Wed, 26 Jan 2022 11:47:54 -0500 Subject: [PATCH 2/4] Add .net6 --- .../InterfaceStubGenerator.Roslyn40.csproj | 2 +- Refit.HttpClientFactory/Refit.HttpClientFactory.csproj | 8 ++++++-- Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj | 2 +- Refit.Tests/Refit.Tests.csproj | 2 +- Refit/Refit.csproj | 2 +- azure-pipelines.yml | 3 +-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/InterfaceStubGenerator.Roslyn40/InterfaceStubGenerator.Roslyn40.csproj b/InterfaceStubGenerator.Roslyn40/InterfaceStubGenerator.Roslyn40.csproj index 4a8cded8d..ff5bcf9d7 100644 --- a/InterfaceStubGenerator.Roslyn40/InterfaceStubGenerator.Roslyn40.csproj +++ b/InterfaceStubGenerator.Roslyn40/InterfaceStubGenerator.Roslyn40.csproj @@ -13,7 +13,7 @@ - + diff --git a/Refit.HttpClientFactory/Refit.HttpClientFactory.csproj b/Refit.HttpClientFactory/Refit.HttpClientFactory.csproj index 7b536e22d..49a73c3f2 100644 --- a/Refit.HttpClientFactory/Refit.HttpClientFactory.csproj +++ b/Refit.HttpClientFactory/Refit.HttpClientFactory.csproj @@ -3,13 +3,17 @@ Refit HTTP Client Factory Extensions Refit HTTP Client Factory Extensions - net5.0;netcoreapp3.1;netstandard2.0 + net6.0;net5.0;netcoreapp3.1;netstandard2.0 enable - + + + + + diff --git a/Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj b/Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj index f0fca8957..947da3c22 100644 --- a/Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj +++ b/Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj @@ -3,7 +3,7 @@ Refit Serializer for Newtonsoft.Json ($(TargetFramework)) Refit Serializers for Newtonsoft.Json - net5.0;netstandard2.0;netstandard2.1;net461 + net6.0;net5.0;netstandard2.0;net461 true Refit enable diff --git a/Refit.Tests/Refit.Tests.csproj b/Refit.Tests/Refit.Tests.csproj index 42554e180..c7c165f4c 100644 --- a/Refit.Tests/Refit.Tests.csproj +++ b/Refit.Tests/Refit.Tests.csproj @@ -3,7 +3,7 @@ - net6.0;netcoreapp3.1;net461 + net6.0;net5.0;netcoreapp3.1;net461 false diff --git a/Refit/Refit.csproj b/Refit/Refit.csproj index cd645a1eb..3e2240dc6 100644 --- a/Refit/Refit.csproj +++ b/Refit/Refit.csproj @@ -2,7 +2,7 @@ Refit ($(TargetFramework)) - net5.0;netstandard2.0;netstandard2.1;net461 + net6.0;net5.0;netstandard2.0;netstandard2.1;net461 true enable diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 039677270..289d87b6f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,11 +31,10 @@ stages: steps: - task: UseDotNet@2 - displayName: Use .NET Core 5.x SDK + displayName: Use .NET 6.x SDK inputs: version: 6.x performMultiLevelLookup: true - includePreviewVersions: true - task: UseDotNet@2 displayName: Use .NET Core 5.x Runtime From 06a6636fc646de11f1e2f7e90f4f733dde168cce Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Wed, 26 Jan 2022 11:49:04 -0500 Subject: [PATCH 3/4] remove extra feeds --- NuGet.config | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 NuGet.config diff --git a/NuGet.config b/NuGet.config deleted file mode 100644 index f7d0724b7..000000000 --- a/NuGet.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file From 39410b16bc5f1b6f046ac094fe8085c3f8f31f6f Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Wed, 26 Jan 2022 12:38:41 -0500 Subject: [PATCH 4/4] Testing support for net6.0 --- NuGet.config | 7 +++++++ Refit.Tests/InterfaceStubGenerator.cs | 4 +++- Refit.Tests/Refit.Tests.csproj | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 NuGet.config diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 000000000..fad809145 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Refit.Tests/InterfaceStubGenerator.cs b/Refit.Tests/InterfaceStubGenerator.cs index 153dfb302..294cf4db9 100644 --- a/Refit.Tests/InterfaceStubGenerator.cs +++ b/Refit.Tests/InterfaceStubGenerator.cs @@ -30,8 +30,10 @@ public class InterfaceStubGeneratorTests static InterfaceStubGeneratorTests() { -#if NET5_0_OR_GREATER +#if NET5_0 ReferenceAssemblies = ReferenceAssemblies.Net.Net50; +#elif NET6_0 + ReferenceAssemblies = ReferenceAssemblies.Net.Net60; #else ReferenceAssemblies = ReferenceAssemblies.Default .AddPackages(ImmutableArray.Create(new PackageIdentity("System.Text.Json", "6.0.1"))); diff --git a/Refit.Tests/Refit.Tests.csproj b/Refit.Tests/Refit.Tests.csproj index c7c165f4c..8d8dd1748 100644 --- a/Refit.Tests/Refit.Tests.csproj +++ b/Refit.Tests/Refit.Tests.csproj @@ -19,7 +19,7 @@ - +