Skip to content

Commit 674889e

Browse files
author
Bart Koelman
authored
Update to JADNC v5 (#13)
* Update to .NET 6 * Reformat solution * Updated to JADNC v5 (without tests, for now) * Rename test project * Updated tests * Update README.md * Fixed glibc version mismatch in Ubuntu cibuild
1 parent fa3157d commit 674889e

File tree

284 files changed

+11222
-10261
lines changed

Some content is hidden

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

284 files changed

+11222
-10261
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2021.1.3",
6+
"version": "2021.3.0",
77
"commands": [
88
"jb"
99
]
1010
},
1111
"regitlint": {
12-
"version": "2.1.4",
12+
"version": "6.0.6",
1313
"commands": [
1414
"regitlint"
1515
]
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
"dotnet-reportgenerator-globaltool": {
24-
"version": "4.8.11",
24+
"version": "5.0.0",
2525
"commands": [
2626
"reportgenerator"
2727
]

Build.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ function CheckLastExitCode {
88

99
function RunInspectCode {
1010
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
11-
dotnet jb inspectcode JsonApiDotNetCore.MongoDb.sln --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=SolutionPersonal -dsl=ProjectPersonal
11+
# passing --build instead of --no-build as workaround for https://youtrack.jetbrains.com/issue/RSRP-487054
12+
dotnet jb inspectcode JsonApiDotNetCore.MongoDb.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
1213
CheckLastExitCode
1314

1415
[xml]$xml = Get-Content "$outputPath"
@@ -47,7 +48,7 @@ function RunCleanupCode {
4748
$mergeCommitHash = git rev-parse "HEAD"
4849
$targetCommitHash = git rev-parse "$env:APPVEYOR_REPO_BRANCH"
4950

50-
dotnet regitlint -s JsonApiDotNetCore.MongoDb.sln --print-command --jb --profile --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $mergeCommitHash -b $targetCommitHash --fail-on-diff --print-diff
51+
dotnet regitlint -s JsonApiDotNetCore.MongoDb.sln --print-command --disable-jb-path-hack --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $mergeCommitHash -b $targetCommitHash --fail-on-diff --print-diff
5152
CheckLastExitCode
5253
}
5354
}
@@ -73,21 +74,21 @@ function CreateNuGetPackage {
7374
$versionSuffix = $suffixSegments -join "-"
7475
}
7576
else {
76-
# Get the version suffix from the auto-incrementing build number. Example: "123" => "pre-0123".
77+
# Get the version suffix from the auto-incrementing build number. Example: "123" => "master-0123".
7778
if ($env:APPVEYOR_BUILD_NUMBER) {
7879
$revision = "{0:D4}" -f [convert]::ToInt32($env:APPVEYOR_BUILD_NUMBER, 10)
79-
$versionSuffix = "pre-$revision"
80+
$versionSuffix = "$($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH ?? $env:APPVEYOR_REPO_BRANCH)-$revision"
8081
}
8182
else {
8283
$versionSuffix = "pre-0001"
8384
}
8485
}
8586

8687
if ([string]::IsNullOrWhitespace($versionSuffix)) {
87-
dotnet pack .\src\JsonApiDotNetCore.MongoDb -c Release -o .\artifacts
88+
dotnet pack --no-restore --no-build --configuration Release --output .\artifacts
8889
}
8990
else {
90-
dotnet pack .\src\JsonApiDotNetCore.MongoDb -c Release -o .\artifacts --version-suffix=$versionSuffix
91+
dotnet pack --no-restore --no-build --configuration Release --output .\artifacts --version-suffix=$versionSuffix
9192
}
9293

9394
CheckLastExitCode

CodingGuidelines.ruleset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
<Rule Id="AV2230" Action="Info" />
2727
<Rule Id="AV2305" Action="None" />
2828
<Rule Id="AV2310" Action="Info" />
29-
<Rule Id="AV2318" Action="Info" />
29+
<Rule Id="AV2318" Action="Warning" />
3030
</Rules>
3131
</RuleSet>

Directory.Build.props

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
<Project>
22
<PropertyGroup>
3-
<NetCoreAppVersion>netcoreapp3.1</NetCoreAppVersion>
4-
<AspNetCoreVersion>3.1.*</AspNetCoreVersion>
5-
<JsonApiDotNetCoreVersion>4.2.*</JsonApiDotNetCoreVersion>
6-
<MongoDBDriverVersion>2.12.*</MongoDBDriverVersion>
7-
<CodeAnalysisRuleSet>$(SolutionDir)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
3+
<TargetFrameworkName>net6.0</TargetFrameworkName>
4+
<AspNetVersion>6.0.*</AspNetVersion>
5+
<JsonApiDotNetCoreVersion>5.0.0-pre1</JsonApiDotNetCoreVersion>
6+
<MongoDBDriverVersion>2.14.*</MongoDBDriverVersion>
7+
<JsonApiDotNetCoreMongoDbVersionPrefix>5.0.0</JsonApiDotNetCoreMongoDbVersionPrefix>
8+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
9+
<WarningLevel>9999</WarningLevel>
10+
<Nullable>enable</Nullable>
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
<IsPackable>false</IsPackable>
13+
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
814
</PropertyGroup>
915

1016
<ItemGroup>
11-
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" PrivateAssets="All" />
12-
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.6.0" PrivateAssets="All" />
13-
<AdditionalFiles Include="$(SolutionDir)CSharpGuidelinesAnalyzer.config" Visible="False" />
17+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
18+
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.7.1" PrivateAssets="All" />
19+
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
1420
</ItemGroup>
1521

1622
<PropertyGroup Condition="'$(Configuration)'=='Release'">
17-
<NoWarn>$(NoWarn);1591</NoWarn>
23+
<NoWarn>$(NoWarn);1591;NU5104</NoWarn>
1824
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1925
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2026
</PropertyGroup>
2127

2228
<!-- Test Project Dependencies -->
2329
<PropertyGroup>
24-
<BogusVersion>33.0.2</BogusVersion>
25-
<CoverletVersion>3.0.3</CoverletVersion>
26-
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
30+
<CoverletVersion>3.1.0</CoverletVersion>
2731
<MoqVersion>4.16.1</MoqVersion>
28-
<XUnitVersion>2.4.*</XUnitVersion>
29-
<TestSdkVersion>16.10.0</TestSdkVersion>
32+
<TestSdkVersion>17.0.0</TestSdkVersion>
3033
</PropertyGroup>
3134
</Project>

JsonApiDotNetCore.MongoDb.sln

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio Version 16
3-
VisualStudioVersion = 16.0.30804.86
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31919.166
45
MinimumVisualStudioVersion = 15.0.26124.0
56
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7E29AA10-F938-4CF8-9CAB-7ACD2D6DC784}"
67
EndProject
@@ -12,10 +13,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GettingStarted", "src\Examp
1213
EndProject
1314
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreMongoDbExample", "src\Examples\JsonApiDotNetCoreMongoDbExample\JsonApiDotNetCoreMongoDbExample.csproj", "{11CC33C8-27D7-44D2-B402-76E3A33285A0}"
1415
EndProject
15-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreMongoDbExampleTests", "test\JsonApiDotNetCoreMongoDbExampleTests\JsonApiDotNetCoreMongoDbExampleTests.csproj", "{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}"
16-
EndProject
1716
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore.MongoDb", "src\JsonApiDotNetCore.MongoDb\JsonApiDotNetCore.MongoDb.csproj", "{FD312677-2A62-4B8F-A965-879B059F1755}"
1817
EndProject
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreMongoDbTests", "test\JsonApiDotNetCoreMongoDbTests\JsonApiDotNetCoreMongoDbTests.csproj", "{911271DD-29BC-40BC-A9CC-29BE7163B66B}"
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBuildingBlocks", "test\TestBuildingBlocks\TestBuildingBlocks.csproj", "{6A0AC606-F11E-4090-B12A-C547BD17EE56}"
21+
EndProject
1922
Global
2023
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2124
Debug|Any CPU = Debug|Any CPU
@@ -50,18 +53,6 @@ Global
5053
{11CC33C8-27D7-44D2-B402-76E3A33285A0}.Release|x64.Build.0 = Release|Any CPU
5154
{11CC33C8-27D7-44D2-B402-76E3A33285A0}.Release|x86.ActiveCfg = Release|Any CPU
5255
{11CC33C8-27D7-44D2-B402-76E3A33285A0}.Release|x86.Build.0 = Release|Any CPU
53-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|x64.ActiveCfg = Debug|Any CPU
56-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|x64.Build.0 = Debug|Any CPU
57-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|x86.ActiveCfg = Debug|Any CPU
58-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Debug|x86.Build.0 = Debug|Any CPU
59-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
60-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|Any CPU.Build.0 = Release|Any CPU
61-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|x64.ActiveCfg = Release|Any CPU
62-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|x64.Build.0 = Release|Any CPU
63-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|x86.ActiveCfg = Release|Any CPU
64-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1}.Release|x86.Build.0 = Release|Any CPU
6556
{FD312677-2A62-4B8F-A965-879B059F1755}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6657
{FD312677-2A62-4B8F-A965-879B059F1755}.Debug|Any CPU.Build.0 = Debug|Any CPU
6758
{FD312677-2A62-4B8F-A965-879B059F1755}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -74,15 +65,40 @@ Global
7465
{FD312677-2A62-4B8F-A965-879B059F1755}.Release|x64.Build.0 = Release|Any CPU
7566
{FD312677-2A62-4B8F-A965-879B059F1755}.Release|x86.ActiveCfg = Release|Any CPU
7667
{FD312677-2A62-4B8F-A965-879B059F1755}.Release|x86.Build.0 = Release|Any CPU
68+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|Any CPU.Build.0 = Debug|Any CPU
70+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|x64.ActiveCfg = Debug|Any CPU
71+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|x64.Build.0 = Debug|Any CPU
72+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|x86.ActiveCfg = Debug|Any CPU
73+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Debug|x86.Build.0 = Debug|Any CPU
74+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|x64.ActiveCfg = Release|Any CPU
77+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|x64.Build.0 = Release|Any CPU
78+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|x86.ActiveCfg = Release|Any CPU
79+
{911271DD-29BC-40BC-A9CC-29BE7163B66B}.Release|x86.Build.0 = Release|Any CPU
80+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|Any CPU.Build.0 = Debug|Any CPU
82+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|x64.ActiveCfg = Debug|Any CPU
83+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|x64.Build.0 = Debug|Any CPU
84+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|x86.ActiveCfg = Debug|Any CPU
85+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Debug|x86.Build.0 = Debug|Any CPU
86+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|Any CPU.ActiveCfg = Release|Any CPU
87+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|Any CPU.Build.0 = Release|Any CPU
88+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|x64.ActiveCfg = Release|Any CPU
89+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|x64.Build.0 = Release|Any CPU
90+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|x86.ActiveCfg = Release|Any CPU
91+
{6A0AC606-F11E-4090-B12A-C547BD17EE56}.Release|x86.Build.0 = Release|Any CPU
7792
EndGlobalSection
7893
GlobalSection(SolutionProperties) = preSolution
7994
HideSolutionNode = FALSE
8095
EndGlobalSection
8196
GlobalSection(NestedProjects) = preSolution
8297
{AA148569-62FF-4E1A-8E16-0E529FA38040} = {7E29AA10-F938-4CF8-9CAB-7ACD2D6DC784}
8398
{11CC33C8-27D7-44D2-B402-76E3A33285A0} = {AA148569-62FF-4E1A-8E16-0E529FA38040}
84-
{24CE53FA-9C49-4E20-A060-4A43DFB8C8F1} = {19A533AA-E006-496D-A476-364DF2B637A1}
8599
{FD312677-2A62-4B8F-A965-879B059F1755} = {7E29AA10-F938-4CF8-9CAB-7ACD2D6DC784}
100+
{911271DD-29BC-40BC-A9CC-29BE7163B66B} = {19A533AA-E006-496D-A476-364DF2B637A1}
101+
{6A0AC606-F11E-4090-B12A-C547BD17EE56} = {19A533AA-E006-496D-A476-364DF2B637A1}
86102
EndGlobalSection
87103
GlobalSection(ExtensibilityGlobals) = postSolution
88104
SolutionGuid = {83EBEC34-0CE5-4D16-93CF-EF5B5CCBC538}

0 commit comments

Comments
 (0)