Skip to content

Commit 01f510e

Browse files
author
David Lebee
committed
multi target :)
1 parent d8576e0 commit 01f510e

File tree

8 files changed

+13
-10
lines changed

8 files changed

+13
-10
lines changed

PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson/MvcBuilderExtensions.cs

+2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ public static IMvcBuilder AddPoweredSoftJsonNetDynamicQuery(this IMvcBuilder mv
99
{
1010
mvcBuilder.AddPoweredSoftDynamicQuery();
1111
var serviceProvider = mvcBuilder.Services.BuildServiceProvider();
12+
1213
mvcBuilder.AddNewtonsoftJson(o =>
1314
{
1415
o.SerializerSettings.AddPoweredSoftDynamicQueryNewtonsoftJson(serviceProvider, enableStringEnumConverter: enableStringEnumConverter);
1516
});
17+
1618
return mvcBuilder;
1719
}
1820
}

PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson/PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson.csproj

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55
<Copyright>Powered Softwares Inc.</Copyright>
66
<PackageLicenseUrl>MIT</PackageLicenseUrl>
77
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>
@@ -20,9 +20,14 @@
2020
<ItemGroup>
2121
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2222
</ItemGroup>
23+
24+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
25+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.0"/>
26+
</ItemGroup>
27+
28+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
29+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.9"/>
2330

24-
<ItemGroup>
25-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.9" />
2631
</ItemGroup>
2732

2833
<ItemGroup>

PoweredSoft.DynamicQuery.AspNetCore/PoweredSoft.DynamicQuery.AspNetCore.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55
<Copyright>Powered Softwares Inc.</Copyright>
66
<PackageLicenseUrl>MIT</PackageLicenseUrl>
77
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>

PoweredSoft.DynamicQuery.Core/PoweredSoft.DynamicQuery.Core.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
2322
</ItemGroup>
2423

2524
</Project>

PoweredSoft.DynamicQuery.NewtonsoftJson/Extensions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Microsoft.Extensions.DependencyInjection;
2-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
32
using Newtonsoft.Json.Converters;
43
using System;
54

PoweredSoft.DynamicQuery.NewtonsoftJson/PoweredSoft.DynamicQuery.NewtonsoftJson.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
<ItemGroup>
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
21-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
2221
</ItemGroup>
2322

2423
<ItemGroup>

PoweredSoft.DynamicQuery.Test/PoweredSoft.DynamicQuery.Test.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFrameworks>net5.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

PoweredSoft.DynamicQuery/PoweredSoft.DynamicQuery.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
2322
<PackageReference Include="PoweredSoft.Data" Version="3.0.0" />
2423
<PackageReference Include="PoweredSoft.DynamicLinq" Version="1.1.12" />
2524
</ItemGroup>

0 commit comments

Comments
 (0)