Skip to content

Commit 90bb783

Browse files
Merge pull request #65 from MakingSense/update-for-dotnet-7
Update support for dotnet 7.0.x
2 parents f498ea4 + 4197960 commit 90bb783

File tree

6 files changed

+12
-21
lines changed

6 files changed

+12
-21
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup .NET
1919
uses: actions/setup-dotnet@v2
2020
with:
21-
dotnet-version: 5.0.x
21+
dotnet-version: 7.0.x
2222
- name: Restore dependencies
2323
run: dotnet restore
2424
- name: Build

NuGet.Config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
55
<clear />
66
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
7-
<add key="aspnetrelease" value="https://www.myget.org/F/aspnetrelease/api/v3/index.json" />
87
<!--
98
<add key="makingsense-aspnet" value="https://ci.appveyor.com/nuget/makingsense-aspnet" />
109
-->

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Visual Studio 2019
1+
os: Visual Studio 2022
22

33
version: 2.2.1-alpha-{build}
44

src/MakingSense.AspNetCore.HypermediaApi/Formatters/HypermediaApiJsonInputFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System;
77
using System.Buffers;
88

9-
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
9+
#if NET6_0_OR_GREATER
1010
using MvcJsonOptions = Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions;
1111
using JsonInputFormatter = Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter;
1212
#endif

src/MakingSense.AspNetCore.HypermediaApi/Formatters/Internal/HypermediaApiMvcOptionsSetup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.Extensions.Options;
88
using Newtonsoft.Json;
99

10-
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
10+
#if NET6_0_OR_GREATER
1111
using MvcJsonOptions = Microsoft.AspNetCore.Mvc.MvcNewtonsoftJsonOptions;
1212
#endif
1313

@@ -46,8 +46,8 @@ public static void ConfigureMvc(
4646
options.OutputFormatters.Clear();
4747

4848
var jsonOutputFormatter =
49-
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
50-
new NewtonsoftJsonOutputFormatter(serializerSettings, charPool, options);
49+
#if NET6_0_OR_GREATER
50+
new NewtonsoftJsonOutputFormatter(serializerSettings, charPool, options, jsonOptions);
5151
#elif NETSTANDARD2_0 || NETFRAMEWORK
5252
new JsonOutputFormatter(serializerSettings, charPool);
5353
#else

src/MakingSense.AspNetCore.HypermediaApi/MakingSense.AspNetCore.HypermediaApi.csproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>MakingSense.AspNetCore.HypermediaApi Class Library</Description>
55
<Authors>MakingSense</Authors>
6-
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp3.0;netstandard2.0;net452</TargetFrameworks>
6+
<TargetFrameworks>net7.0;net6.0;netstandard2.0;net452</TargetFrameworks>
77
<AssemblyName>MakingSense.AspNetCore.HypermediaApi</AssemblyName>
88
<PackageId>MakingSense.AspNetCore.HypermediaApi</PackageId>
99
<PackageTags>ASP.NET 5;vnext;Hypermedia;API;REST;ASP.NET Core</PackageTags>
@@ -19,25 +19,17 @@
1919
<ProjectReference Include="..\MakingSense.AspNetCore.Abstractions\MakingSense.AspNetCore.Abstractions.csproj" />
2020
</ItemGroup>
2121

22-
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
23-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
24-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson">
25-
<Version>5.0.3</Version>
26-
</PackageReference>
27-
</ItemGroup>
28-
29-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
22+
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
3023
<FrameworkReference Include="Microsoft.AspNetCore.App" />
3124
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson">
32-
<Version>3.1.0</Version>
25+
<Version>7.0.1</Version>
3326
</PackageReference>
3427
</ItemGroup>
3528

36-
37-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
38-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
29+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
30+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
3931
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson">
40-
<Version>3.0.0</Version>
32+
<Version>6.0.12</Version>
4133
</PackageReference>
4234
</ItemGroup>
4335

0 commit comments

Comments
 (0)