Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Add DotNet 8 support #1701

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Refit.HttpClientFactory/Refit.HttpClientFactory.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Product>Refit HTTP Client Factory Extensions</Product>
<Description>Refit HTTP Client Factory Extensions</Description>
<TargetFrameworks>netstandard2.0;net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
5 changes: 2 additions & 3 deletions Refit.Newtonsoft.Json/Refit.Newtonsoft.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
<PropertyGroup>
<Product>Refit Serializer for Newtonsoft.Json ($(TargetFramework))</Product>
<Description>Refit Serializers for Newtonsoft.Json</Description>
<TargetFrameworks>netstandard2.0;net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1</TargetFrameworks>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<RootNamespace>Refit</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
Expand Down
14 changes: 5 additions & 9 deletions Refit.Tests/Refit.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\Refit\targets\refit.props" />

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net7.0;net8.0</TargetFrameworks>
<Deterministic>false</Deterministic> <!-- Some tests rely on CallerFilePath -->
<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Test Files\Test.pdf" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2-beta1.23509.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2-beta1.24169.1" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<ProjectReference Include="..\Refit.HttpClientFactory\Refit.HttpClientFactory.csproj" />
<ProjectReference Include="..\Refit.Newtonsoft.Json\Refit.Newtonsoft.Json.csproj" />
Expand All @@ -29,9 +29,5 @@
<ProjectReference Include="..\InterfaceStubGenerator.Roslyn40\InterfaceStubGenerator.Roslyn40.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
<Reference Include="System.Net.Http" />
</ItemGroup>

<Import Project="..\Refit\targets\refit.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Testing.Verifiers;

namespace Refit.Tests
{
public static partial class CSharpIncrementalSourceGeneratorVerifier<TIncrementalGenerator>
where TIncrementalGenerator : IIncrementalGenerator, new()
{
public class Test : CSharpSourceGeneratorTest<EmptySourceGeneratorProvider, XUnitVerifier>
public class Test : CSharpSourceGeneratorTest<EmptySourceGeneratorProvider, DefaultVerifier>
{
public Test()
{
Expand Down
4 changes: 2 additions & 2 deletions Refit.Tests/Verifiers/CSharpSourceGeneratorVerifier`1+Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Microsoft.CodeAnalysis.Testing;

namespace Refit.Tests
{
public static partial class CSharpSourceGeneratorVerifier<TSourceGenerator>
where TSourceGenerator : ISourceGenerator, new()
{
public class Test : CSharpSourceGeneratorTest<TSourceGenerator, XUnitVerifier>
public class Test : CSharpSourceGeneratorTest<TSourceGenerator, DefaultVerifier>
{
public Test()
{
Expand Down
2 changes: 1 addition & 1 deletion Refit.Xml/Refit.Xml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Product>Refit Xml Serializer ($(TargetFramework))</Product>
<Description>Refit Serializers for Xml</Description>
<TargetFrameworks>netstandard2.0;net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1</TargetFrameworks>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<RootNamespace>Refit</RootNamespace>
<Nullable>enable</Nullable>
Expand Down
11 changes: 7 additions & 4 deletions Refit/Refit.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Product>Refit ($(TargetFramework))</Product>
<TargetFrameworks>netstandard2.0;netstandard2.1;net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1</TargetFrameworks>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>

<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<ItemGroup>
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.1'">
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Web" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
Loading