Skip to content

Commit 0530e34

Browse files
committed
Upgrade to .NET Core SDK 5.0.100
1 parent 0b8e26c commit 0530e34

File tree

48 files changed

+164
-243
lines changed

Some content is hidden

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

48 files changed

+164
-243
lines changed

.editorconfig

Lines changed: 66 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 1.6.2 (Using https://semver.org/)
2-
# Updated: 2020-11-02
1+
# Version: 2.0.0 (Using https://semver.org/)
2+
# Updated: 2020-11-15
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -80,106 +80,115 @@ indent_style = tab
8080
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
8181
##########################################
8282

83+
# Default Severity for .NET Code Style
84+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
85+
dotnet_analyzer_diagnostic.severity = warning
86+
8387
# .NET Code Style Settings
8488
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
8589
[*.{cs,csx,cake,vb,vbx}]
8690
# "this." and "Me." qualifiers
8791
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
88-
dotnet_style_qualification_for_field = true:warning
89-
dotnet_style_qualification_for_property = true:warning
90-
dotnet_style_qualification_for_method = true:warning
91-
dotnet_style_qualification_for_event = true:warning
92+
dotnet_style_qualification_for_field = true
93+
dotnet_style_qualification_for_property = true
94+
dotnet_style_qualification_for_method = true
95+
dotnet_style_qualification_for_event = true
9296
# Language keywords instead of framework type names for type references
9397
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords
94-
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
95-
dotnet_style_predefined_type_for_member_access = true:warning
98+
dotnet_style_predefined_type_for_locals_parameters_members = true
99+
dotnet_style_predefined_type_for_member_access = true
96100
# Modifier preferences
97101
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
98-
dotnet_style_require_accessibility_modifiers = always:warning
99-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
100-
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
101-
dotnet_style_readonly_field = true:warning
102+
dotnet_style_require_accessibility_modifiers = always
103+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
104+
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async
105+
dotnet_style_readonly_field = true
102106
# Parentheses preferences
103107
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences
104-
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
105-
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
106-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
107-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
108+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
109+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
110+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
111+
dotnet_style_parentheses_in_other_operators = always_for_clarity
108112
# Expression-level preferences
109113
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
110-
dotnet_style_object_initializer = true:warning
111-
dotnet_style_collection_initializer = true:warning
112-
dotnet_style_explicit_tuple_names = true:warning
113-
dotnet_style_prefer_inferred_tuple_names = true:warning
114-
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
115-
dotnet_style_prefer_auto_properties = true:warning
116-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
117-
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
118-
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
119-
dotnet_style_prefer_compound_assignment = true:warning
114+
dotnet_style_object_initializer = true
115+
dotnet_style_collection_initializer = true
116+
dotnet_style_explicit_tuple_names = true
117+
dotnet_style_prefer_inferred_tuple_names = true
118+
dotnet_style_prefer_inferred_anonymous_type_member_names = true
119+
dotnet_style_prefer_auto_properties = true
120+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
121+
dotnet_style_prefer_conditional_expression_over_assignment = false
122+
dotnet_diagnostic.IDE0045.severity = suggestion
123+
dotnet_style_prefer_conditional_expression_over_return = false
124+
dotnet_diagnostic.IDE0046.severity = suggestion
125+
dotnet_style_prefer_compound_assignment = true
120126
# Null-checking preferences
121127
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences
122-
dotnet_style_coalesce_expression = true:warning
123-
dotnet_style_null_propagation = true:warning
128+
dotnet_style_coalesce_expression = true
129+
dotnet_style_null_propagation = true
124130
# Parameter preferences
125131
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences
126-
dotnet_code_quality_unused_parameters = all:warning
132+
dotnet_code_quality_unused_parameters = all
127133
# More style options (Undocumented)
128134
# https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641
129135
dotnet_style_operator_placement_when_wrapping = end_of_line
130136
# https://github.com/dotnet/roslyn/pull/40070
131-
dotnet_style_prefer_simplified_interpolation = true:warning
137+
dotnet_style_prefer_simplified_interpolation = true
132138

133139
# C# Code Style Settings
134140
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
135141
[*.{cs,csx,cake}]
136142
# Implicit and explicit types
137143
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
138-
csharp_style_var_for_built_in_types = true:warning
139-
csharp_style_var_when_type_is_apparent = true:warning
140-
csharp_style_var_elsewhere = true:warning
144+
csharp_style_var_for_built_in_types = true
145+
csharp_style_var_when_type_is_apparent = true
146+
csharp_style_var_elsewhere = true
141147
# Expression-bodied members
142148
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members
143-
csharp_style_expression_bodied_methods = true:warning
144-
csharp_style_expression_bodied_constructors = true:warning
145-
csharp_style_expression_bodied_operators = true:warning
146-
csharp_style_expression_bodied_properties = true:warning
147-
csharp_style_expression_bodied_indexers = true:warning
148-
csharp_style_expression_bodied_accessors = true:warning
149-
csharp_style_expression_bodied_lambdas = true:warning
150-
csharp_style_expression_bodied_local_functions = true:warning
149+
csharp_style_expression_bodied_methods = true
150+
csharp_style_expression_bodied_constructors = true
151+
csharp_style_expression_bodied_operators = true
152+
csharp_style_expression_bodied_properties = true
153+
csharp_style_expression_bodied_indexers = true
154+
csharp_style_expression_bodied_accessors = true
155+
csharp_style_expression_bodied_lambdas = true
156+
csharp_style_expression_bodied_local_functions = true
151157
# Pattern matching
152158
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching
153-
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
154-
csharp_style_pattern_matching_over_as_with_null_check = true:warning
159+
csharp_style_pattern_matching_over_is_with_cast_check = true
160+
csharp_style_pattern_matching_over_as_with_null_check = true
155161
# Inlined variable declarations
156162
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations
157-
csharp_style_inlined_variable_declaration = true:warning
163+
csharp_style_inlined_variable_declaration = true
158164
# Expression-level preferences
159165
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
160-
csharp_prefer_simple_default_expression = true:warning
166+
csharp_prefer_simple_default_expression = true
161167
# "Null" checking preferences
162168
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences
163-
csharp_style_throw_expression = true:warning
164-
csharp_style_conditional_delegate_call = true:warning
169+
csharp_style_throw_expression = true
170+
csharp_style_conditional_delegate_call = true
165171
# Code block preferences
166172
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences
167-
csharp_prefer_braces = true:warning
173+
csharp_prefer_braces = true
168174
# Unused value preferences
169175
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences
170-
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
171-
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
176+
csharp_style_unused_value_expression_statement_preference = discard_variable
177+
dotnet_diagnostic.IDE0058.severity = suggestion
178+
csharp_style_unused_value_assignment_preference = discard_variable
179+
dotnet_diagnostic.IDE0059.severity = suggestion
172180
# Index and range preferences
173181
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
174-
csharp_style_prefer_index_operator = true:warning
175-
csharp_style_prefer_range_operator = true:warning
182+
csharp_style_prefer_index_operator = true
183+
csharp_style_prefer_range_operator = true
176184
# Miscellaneous preferences
177185
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
178-
csharp_style_deconstructed_variable_declaration = true:warning
179-
csharp_style_pattern_local_over_anonymous_function = true:warning
180-
csharp_using_directive_placement = inside_namespace:warning
181-
csharp_prefer_static_local_function = true:warning
182-
csharp_prefer_simple_using_statement = true:suggestion
186+
csharp_style_deconstructed_variable_declaration = true
187+
csharp_style_pattern_local_over_anonymous_function = true
188+
csharp_using_directive_placement = inside_namespace
189+
csharp_prefer_static_local_function = true
190+
csharp_prefer_simple_using_statement = true
191+
dotnet_diagnostic.IDE0063.severity = suggestion
183192

184193
##########################################
185194
# .NET Formatting Conventions

Benchmarks/Boxed.Mapping.Benchmark/Boxed.Mapping.Benchmark.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup Label="Build">
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>netcoreapp3.1;net461;net472</TargetFrameworks>
5+
<TargetFrameworks>net5.0;netcoreapp3.1;net472</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

Benchmarks/Boxed.Mapping.Benchmark/MapArrayBenchmark.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ namespace Boxed.Mapping.Benchmark
1515
[HtmlExporter]
1616
[CsvMeasurementsExporter]
1717
[RPlotExporter]
18-
[SimpleJob(RuntimeMoniker.Net472)]
18+
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
1919
[SimpleJob(RuntimeMoniker.NetCoreApp30)]
20+
[SimpleJob(RuntimeMoniker.Net472)]
2021
public class MapArrayBenchmark
2122
{
2223
private readonly IMapper automapper;

Benchmarks/Boxed.Mapping.Benchmark/MapListBenchmark.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ namespace Boxed.Mapping.Benchmark
1616
[HtmlExporter]
1717
[CsvMeasurementsExporter]
1818
[RPlotExporter]
19-
[SimpleJob(RuntimeMoniker.Net472)]
19+
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
2020
[SimpleJob(RuntimeMoniker.NetCoreApp30)]
21+
[SimpleJob(RuntimeMoniker.Net472)]
2122
public class MapListBenchmark
2223
{
2324
private readonly IMapper automapper;

Benchmarks/Boxed.Mapping.Benchmark/MapObjectBenchmark.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ namespace Boxed.Mapping.Benchmark
1515
[HtmlExporter]
1616
[CsvMeasurementsExporter]
1717
[RPlotExporter]
18-
[SimpleJob(RuntimeMoniker.Net472)]
18+
[SimpleJob(RuntimeMoniker.NetCoreApp50)]
1919
[SimpleJob(RuntimeMoniker.NetCoreApp30)]
20+
[SimpleJob(RuntimeMoniker.Net472)]
2021
public class MapObjectBenchmark
2122
{
2223
private readonly IMapper automapper;

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup Label="Build">
44
<LangVersion>latest</LangVersion>
5+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
56
<AnalysisLevel>latest</AnalysisLevel>
67
<NeutralLanguage>en-GB</NeutralLanguage>
78
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -21,7 +22,6 @@
2122
</PropertyGroup>
2223

2324
<ItemGroup Label="Package References">
24-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" PrivateAssets="All" Version="3.3.1" />
2525
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="All" Version="16.8.55" />
2626
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" />
2727
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />

Source/Boxed.AspNetCore.Swagger/Boxed.AspNetCore.Swagger.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup Label="Build">
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Label="Package">
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup Label="Package References">
18-
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="3.1.8" />
18+
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="5.0.0" />
1919
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.0" />
2020
</ItemGroup>
2121

Source/Boxed.AspNetCore.Swagger/FilterDescriptorExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static IList<IAuthorizationRequirement> GetPolicyRequirements(
3030

3131
if (filterDescriptor.Filter is AuthorizeFilter authorizeFilter)
3232
{
33-
if (authorizeFilter.Policy is object)
33+
if (authorizeFilter.Policy is not null)
3434
{
3535
policyRequirements.AddRange(authorizeFilter.Policy.Requirements);
3636
}

Source/Boxed.AspNetCore.Swagger/SwaggerGenOptionsExtensions.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ public static SwaggerGenOptions IncludeXmlCommentsIfExists(this SwaggerGenOption
3232
}
3333

3434
var filePath = Path.ChangeExtension(assembly.Location, ".xml");
35-
if (!IncludeXmlCommentsIfExists(options, filePath) && (assembly.CodeBase is object))
36-
{
37-
filePath = Path.ChangeExtension(new Uri(assembly.CodeBase).AbsolutePath, ".xml");
38-
IncludeXmlCommentsIfExists(options, filePath);
39-
}
35+
IncludeXmlCommentsIfExists(options, filePath);
4036

4137
return options;
4238
}

Source/Boxed.AspNetCore.TagHelpers/Boxed.AspNetCore.TagHelpers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup Label="Build">
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Label="Package">

0 commit comments

Comments
 (0)