Skip to content

Commit b57ff60

Browse files
committed
Multi-target against .NET 6 and .NET 8
1 parent 507851e commit b57ff60

File tree

51 files changed

+177
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+177
-84
lines changed

.github/workflows/build.yml

+15-6
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ jobs:
4747
- name: Setup .NET
4848
uses: actions/setup-dotnet@v3
4949
with:
50-
dotnet-version: 6.0.x
50+
dotnet-version: |
51+
6.0.x
52+
8.0.x
53+
dotnet-quality: 'preview'
5154
- name: Setup PowerShell (Ubuntu)
5255
if: matrix.os == 'ubuntu-latest'
5356
run: |
@@ -178,7 +181,10 @@ jobs:
178181
- name: Setup .NET
179182
uses: actions/setup-dotnet@v3
180183
with:
181-
dotnet-version: 6.0.x
184+
dotnet-version: |
185+
6.0.x
186+
8.0.x
187+
dotnet-quality: 'preview'
182188
- name: Git checkout
183189
uses: actions/checkout@v4
184190
- name: Restore tools
@@ -189,7 +195,7 @@ jobs:
189195
run: |
190196
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
191197
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
192-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
198+
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
193199
- name: Verify outcome
194200
shell: pwsh
195201
run: |
@@ -229,7 +235,10 @@ jobs:
229235
- name: Setup .NET
230236
uses: actions/setup-dotnet@v3
231237
with:
232-
dotnet-version: 6.0.x
238+
dotnet-version: |
239+
6.0.x
240+
8.0.x
241+
dotnet-quality: 'preview'
233242
- name: Git checkout
234243
uses: actions/checkout@v4
235244
with:
@@ -250,13 +259,13 @@ jobs:
250259
$baseCommitHash = git rev-parse HEAD~1
251260
252261
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
253-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
262+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
254263
- name: CleanupCode (on branch)
255264
if: github.event_name == 'push' || github.event_name == 'release'
256265
shell: pwsh
257266
run: |
258267
Write-Output "Running code cleanup on all files."
259-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
268+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version)--jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
260269
261270
publish:
262271
timeout-minutes: 60

Directory.Build.props

+6-27
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,21 @@
1313
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
1414
</PropertyGroup>
1515

16+
<!-- To be removed when stable .NET 8 version has been released. -->
1617
<PropertyGroup>
17-
<!-- Published dependencies (only update on major version change) -->
18-
<TargetFrameworkName>net6.0</TargetFrameworkName>
19-
<CodeAnalysisFrozenVersion>4.1.0</CodeAnalysisFrozenVersion>
20-
<DemystifierFrozenVersion>0.4.1</DemystifierFrozenVersion>
21-
<EntityFrameworkCoreFrozenVersion>6.0.0</EntityFrameworkCoreFrozenVersion>
22-
<HumanizerFrozenVersion>2.14.1</HumanizerFrozenVersion>
23-
24-
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
25-
<AspNetCoreVersion>6.0.*</AspNetCoreVersion>
26-
<BenchmarkDotNetVersion>0.13.*</BenchmarkDotNetVersion>
27-
<BogusVersion>34.0.*</BogusVersion>
28-
<CSharpGuidelinesAnalyzerVersion>3.8.*</CSharpGuidelinesAnalyzerVersion>
29-
<CodeAnalysisVersion>4.7.*</CodeAnalysisVersion>
30-
<CoverletVersion>6.0.*</CoverletVersion>
31-
<DateOnlyTimeOnlyVersion>2.1.*</DateOnlyTimeOnlyVersion>
32-
<EntityFrameworkCoreVersion>7.0.*</EntityFrameworkCoreVersion>
33-
<FluentAssertionsVersion>6.12.*</FluentAssertionsVersion>
34-
<GitHubActionsTestLoggerVersion>2.3.*</GitHubActionsTestLoggerVersion>
35-
<InheritDocVersion>1.3.*</InheritDocVersion>
36-
<JetBrainsAnnotationsVersion>2023.2.*</JetBrainsAnnotationsVersion>
37-
<NpgsqlVersion>7.0.*</NpgsqlVersion>
38-
<SourceLinkVersion>1.1.*</SourceLinkVersion>
39-
<SystemTextJsonVersion>7.0.*</SystemTextJsonVersion>
40-
<TestSdkVersion>17.7.*</TestSdkVersion>
41-
<XunitVersion>2.5.*</XunitVersion>
18+
<NoWarn>$(NoWarn);NU5104</NoWarn>
19+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
4220
</PropertyGroup>
4321

4422
<ItemGroup>
45-
<PackageReference Include="JetBrains.Annotations" Version="$(JetBrainsAnnotationsVersion)" PrivateAssets="All" />
46-
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="$(CSharpGuidelinesAnalyzerVersion)" PrivateAssets="All" />
23+
<PackageReference Include="JetBrains.Annotations" Version="2023.2.*" PrivateAssets="All" />
24+
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.*" PrivateAssets="All" />
4725
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
4826
</ItemGroup>
4927

5028
<PropertyGroup>
5129
<Nullable>enable</Nullable>
30+
<LangVersion>latest</LangVersion>
5231
<ImplicitUsings>enable</ImplicitUsings>
5332
<IsPackable>false</IsPackable>
5433
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>

JsonApiDotNetCore.sln

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
CodingGuidelines.ruleset = CodingGuidelines.ruleset
1414
CSharpGuidelinesAnalyzer.config = CSharpGuidelinesAnalyzer.config
1515
Directory.Build.props = Directory.Build.props
16+
package-versions.props = package-versions.props
1617
EndProjectSection
1718
EndProject
1819
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{026FBC6C-AF76-4568-9B87-EC73457899FD}"

benchmarks/Benchmarks.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ServerGarbageCollection>true</ServerGarbageCollection>
66
</PropertyGroup>
77

8+
<Import Project="..\package-versions.props" />
9+
810
<ItemGroup>
911
<ProjectReference Include="..\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
1012
</ItemGroup>

cleanupcode.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ if ($revision) {
2828

2929
if ($baseCommitHash -eq $headCommitHash) {
3030
Write-Output "Running code cleanup on staged/unstaged files."
31-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
31+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
3232
VerifySuccessExitCode
3333
}
3434
else {
3535
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
36-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
36+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
3737
VerifySuccessExitCode
3838
}
3939
}
4040
else {
4141
Write-Output "Running code cleanup on all files."
42-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
42+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
4343
VerifySuccessExitCode
4444
}

docs/generate-examples.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Start-WebServer {
3434
Write-Output "Starting web server"
3535
$startTimeUtc = Get-Date -AsUTC
3636
$job = Start-Job -ScriptBlock {
37-
dotnet run --project ..\src\Examples\GettingStarted\GettingStarted.csproj --configuration Debug --property:TreatWarningsAsErrors=True --urls=http://0.0.0.0:14141
37+
dotnet run --project ..\src\Examples\GettingStarted\GettingStarted.csproj --framework net8.0 --configuration Debug --property:TreatWarningsAsErrors=True --urls=http://0.0.0.0:14141
3838
}
3939

4040
$webProcessId = $null

inspectcode.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if ($LastExitCode -ne 0) {
1010

1111
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
1212
$resultPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.html')
13-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
13+
dotnet jb inspectcode JsonApiDotNetCore.sln --dotnetcoresdk=$(dotnet --version) --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
1414

1515
if ($LastExitCode -ne 0) {
1616
throw "Code inspection failed with exit code $LastExitCode"

package-versions.props

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Published dependencies (only update on major version change) -->
4+
<CodeAnalysisFrozenVersion>4.1.0</CodeAnalysisFrozenVersion>
5+
<DemystifierFrozenVersion>0.4.1</DemystifierFrozenVersion>
6+
<HumanizerFrozenVersion>2.14.1</HumanizerFrozenVersion>
7+
8+
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
9+
<BenchmarkDotNetVersion>0.13.*</BenchmarkDotNetVersion>
10+
<BogusVersion>34.0.*</BogusVersion>
11+
<CSharpGuidelinesAnalyzerVersion>3.8.*</CSharpGuidelinesAnalyzerVersion>
12+
<CodeAnalysisVersion>4.7.*</CodeAnalysisVersion>
13+
<CoverletVersion>6.0.*</CoverletVersion>
14+
<DateOnlyTimeOnlyVersion>2.1.*</DateOnlyTimeOnlyVersion>
15+
<FluentAssertionsVersion>6.12.*</FluentAssertionsVersion>
16+
<GitHubActionsTestLoggerVersion>2.3.*</GitHubActionsTestLoggerVersion>
17+
<InheritDocVersion>1.3.*</InheritDocVersion>
18+
<JetBrainsAnnotationsVersion>2023.2.*</JetBrainsAnnotationsVersion>
19+
<SourceLinkVersion>1.1.*</SourceLinkVersion>
20+
<TestSdkVersion>17.7.*</TestSdkVersion>
21+
<XunitVersion>2.5.*</XunitVersion>
22+
</PropertyGroup>
23+
24+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
25+
<!-- Published dependencies (only update on major version change) -->
26+
<EntityFrameworkCoreFrozenVersion>8.0.0-rc.1.*</EntityFrameworkCoreFrozenVersion>
27+
28+
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
29+
<AspNetCoreVersion>8.0.0-rc.1.*</AspNetCoreVersion>
30+
<EntityFrameworkCoreVersion>8.0.0-rc.1.*</EntityFrameworkCoreVersion>
31+
<NpgsqlVersion>8.0.0-rc.1</NpgsqlVersion>
32+
<SystemTextJsonVersion>$(AspNetCoreVersion)</SystemTextJsonVersion>
33+
</PropertyGroup>
34+
35+
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
36+
<!-- Published dependencies (only update on major version change) -->
37+
<EntityFrameworkCoreFrozenVersion>6.0.0</EntityFrameworkCoreFrozenVersion>
38+
39+
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
40+
<AspNetCoreVersion>6.0.*</AspNetCoreVersion>
41+
<EntityFrameworkCoreVersion>7.0.*</EntityFrameworkCoreVersion>
42+
<NpgsqlVersion>7.0.*</NpgsqlVersion>
43+
<SystemTextJsonVersion>7.0.*</SystemTextJsonVersion>
44+
</PropertyGroup>
45+
</Project>

src/Examples/DatabasePerTenantExample/DatabasePerTenantExample.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/Examples/GettingStarted/GettingStarted.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/Examples/JsonApiDotNetCoreExample/Definitions/TodoItemDefinition.cs

+14-4
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,30 @@
55
using JsonApiDotNetCore.Queries.Expressions;
66
using JsonApiDotNetCore.Resources;
77
using JsonApiDotNetCoreExample.Models;
8+
#if NET6_0
89
using Microsoft.AspNetCore.Authentication;
10+
#endif
911

1012
namespace JsonApiDotNetCoreExample.Definitions;
1113

1214
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
1315
public sealed class TodoItemDefinition : JsonApiResourceDefinition<TodoItem, long>
1416
{
15-
private readonly ISystemClock _systemClock;
17+
private readonly Func<DateTimeOffset> _getUtcNow;
1618

19+
#if NET6_0
1720
public TodoItemDefinition(IResourceGraph resourceGraph, ISystemClock systemClock)
1821
: base(resourceGraph)
1922
{
20-
_systemClock = systemClock;
23+
_getUtcNow = () => systemClock.UtcNow;
2124
}
25+
#else
26+
public TodoItemDefinition(IResourceGraph resourceGraph, TimeProvider timeProvider)
27+
: base(resourceGraph)
28+
{
29+
_getUtcNow = timeProvider.GetUtcNow;
30+
}
31+
#endif
2232

2333
public override SortExpression OnApplySort(SortExpression? existingSort)
2434
{
@@ -38,11 +48,11 @@ public override Task OnWritingAsync(TodoItem resource, WriteOperationKind writeO
3848
{
3949
if (writeOperation == WriteOperationKind.CreateResource)
4050
{
41-
resource.CreatedAt = _systemClock.UtcNow;
51+
resource.CreatedAt = _getUtcNow();
4252
}
4353
else if (writeOperation == WriteOperationKind.UpdateResource)
4454
{
45-
resource.LastModifiedAt = _systemClock.UtcNow;
55+
resource.LastModifiedAt = _getUtcNow();
4656
}
4757

4858
return Task.CompletedTask;

src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/Examples/JsonApiDotNetCoreExample/Program.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
using JsonApiDotNetCore.Configuration;
55
using JsonApiDotNetCore.Diagnostics;
66
using JsonApiDotNetCoreExample.Data;
7-
using Microsoft.AspNetCore.Authentication;
87
using Microsoft.EntityFrameworkCore;
98
using Microsoft.EntityFrameworkCore.Diagnostics;
109
using Microsoft.Extensions.DependencyInjection.Extensions;
10+
#if NET6_0
11+
using Microsoft.AspNetCore.Authentication;
12+
#endif
1113

1214
[assembly: ExcludeFromCodeCoverage]
1315

@@ -45,7 +47,11 @@ static void ConfigureServices(WebApplicationBuilder builder)
4547
{
4648
using IDisposable _ = CodeTimingSessionManager.Current.Measure("Configure services");
4749

50+
#if NET6_0
4851
builder.Services.TryAddSingleton<ISystemClock, SystemClock>();
52+
#else
53+
builder.Services.TryAddSingleton(TimeProvider.System);
54+
#endif
4955

5056
builder.Services.AddDbContext<AppDbContext>(options =>
5157
{

src/Examples/MultiDbContextExample/MultiDbContextExample.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/Examples/NoEntityFrameworkExample/Data/InMemoryModel.cs

+5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ private static void SetEntityProperties(RuntimeEntityType entityType, ResourceTy
1919
{
2020
foreach (PropertyInfo property in resourceType.ClrType.GetProperties())
2121
{
22+
#if NET8_0
23+
// Temporary workaround for EF Core 8 RC1, to be removed when RC2 has been released.
24+
entityType.AddProperty(property.Name, property.PropertyType, propertyInfo: property);
25+
#else
2226
entityType.AddProperty(property.Name, property.PropertyType, property);
27+
#endif
2328
}
2429
}
2530
}

src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/Examples/ReportsExample/ReportsExample.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>$(TargetFrameworkName)</TargetFramework>
3+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
44
</PropertyGroup>
55

6+
<Import Project="..\..\..\package-versions.props" />
7+
68
<ItemGroup>
79
<ProjectReference Include="..\..\JsonApiDotNetCore\JsonApiDotNetCore.csproj" />
810
<ProjectReference Include="..\..\JsonApiDotNetCore.SourceGenerators\JsonApiDotNetCore.SourceGenerators.csproj" OutputItemType="Analyzer"

src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>$(TargetFrameworkName);netstandard1.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net6.0;netstandard1.0</TargetFrameworks>
44
<IsPackable>true</IsPackable>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>JsonApiDotNetCore</RootNamespace>
7-
<LangVersion>latest</LangVersion>
87
</PropertyGroup>
98

9+
<Import Project="..\..\package-versions.props" />
10+
1011
<PropertyGroup>
1112
<VersionPrefix>$(JsonApiDotNetCoreVersionPrefix)</VersionPrefix>
1213
<PackageTags>jsonapidotnetcore;jsonapi;json:api;dotnet;asp.net;rest;web-api</PackageTags>

0 commit comments

Comments
 (0)