Skip to content

Commit

Permalink
Update to .NET 6.0 and latest dependencies (#132)
Browse files Browse the repository at this point in the history
* Upgrade target framework to net6.0

* Update to v2.1 of Endjin.RecommendedPractices

* Ask for .NET 6 SDK

* Try scripted build, since classic build chokes

* Fix path in build.ps1
  • Loading branch information
idg10 committed Feb 14, 2022
1 parent cb0cc70 commit 5390667
Show file tree
Hide file tree
Showing 15 changed files with 1,929 additions and 76 deletions.
44 changes: 37 additions & 7 deletions Solutions/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@

# Code style rules for enforcing the endjin house style
# See: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]

# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2

# C# files
[*.{cs,csx}]
indent_size = 4
insert_final_newline = false

# Core editorconfig formatting - indentation

Expand All @@ -25,10 +37,6 @@ csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_open_brace = object_collection, object_collection_array_initalizers, accessors, lambdas, control_blocks, methods, properties, types

# Formatting - organize using options

dotnet_sort_system_directives_first = true

# Formatting - spacing options

csharp_space_after_cast = false
Expand Down Expand Up @@ -76,5 +84,27 @@ dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_property = true:suggestion
dotnet_style_qualification_for_event = true:suggestion

# Style - using
csharp_using_directive_placement = inside_namespace:warning
# Style - using directives and namespace declarations
csharp_using_directive_placement = inside_namespace:warning
dotnet_sort_system_directives_first = true

# Code analyzer rules (formerly in StyleCop.ruleset)
# SA1025 makes it impossible to write decent-looking switch expressions because it
# doesn't allow multiple whitespace characters in a row. There seems to be no way to
# disable this rule just inside switch expressions, so we reluctantly live without it.
dotnet_diagnostic.SA1025.severity = None
# StyleCop's insistence that constructors' summaries must always start with exactly
# the same boilerplate text is not deeply helpful. Saying "Creates a Foo"
# is in most cases better than the "Initializes a new instance of the Foo type"
# that this rule insists on.
dotnet_diagnostic.SA1642.severity = None

# CLS Compliance - not relevant for most of what we work on.
dotnet_diagnostic.CA1014.severity = None

# Standard exception constructors - not helpful when the exception absolutely needs certain information
dotnet_diagnostic.CA1032.severity = None
dotnet_diagnostic.RCS1194.severity = None

# Localize string constants - apps that want localization can turn this back on
dotnet_diagnostic.CA1303.severity = None
12 changes: 9 additions & 3 deletions Solutions/Ais.Net.Models.Specs/Ais.Net.Models.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(EndjinProjectPropsPath)" Condition="$(EndjinProjectPropsPath) != ''" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<RootNamespace>Corvus.Configuration.Specs</RootNamespace>
Expand All @@ -15,12 +15,18 @@
<NoWarn>RCS1029;SA0001;SA1204;SA1600;SA1602;CS1591</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="$(ContinuousIntegrationBuild) == 'true'">true</RestoreLockedMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Endjin.RecommendedPractices" Version="1.2.0">
<PackageReference Include="Corvus.Testing.SpecFlow.NUnit" Version="1.4.8" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Corvus.Testing.SpecFlow.NUnit" Version="1.4.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Ais.Net.Models\Ais.Net.Models.csproj" />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions Solutions/Ais.Net.Models.Specs/GlobalSuppressions.cs

This file was deleted.

Loading

0 comments on commit 5390667

Please sign in to comment.