Skip to content

Commit 732f518

Browse files
Merge pull request #76 from atc-net/feature/dotnet8
Update with .NET 8
2 parents ae8f6be + c9aba7f commit 732f518

File tree

9 files changed

+777
-0
lines changed

9 files changed

+777
-0
lines changed

distribution/dotnet8/.editorconfig

Lines changed: 512 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup Label="Metadata configuration">
5+
<OrganizationName><!-- insert organization name here --></OrganizationName>
6+
<RepositoryName><!-- insert repository name here --></RepositoryName>
7+
</PropertyGroup>
8+
9+
<!-- Solution wide properties -->
10+
<PropertyGroup Label="Assembly Naming">
11+
<Company>$(OrganizationName)</Company>
12+
<Authors>$(OrganizationName)</Authors>
13+
<NeutralLanguage>en</NeutralLanguage>
14+
<DefaultLanguage>en-US</DefaultLanguage>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Label="Compile settings">
18+
<Nullable>enable</Nullable>
19+
<LangVersion>12.0</LangVersion>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<TargetFramework>net8.0</TargetFramework>
22+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
23+
<NoWarn>1573,1591,1712,CA1014</NoWarn>
24+
25+
<!-- Used by code coverage -->
26+
<DebugType>full</DebugType>
27+
<DebugSymbols>true</DebugSymbols>
28+
</PropertyGroup>
29+
30+
<PropertyGroup Label="Analyzer settings">
31+
<AnalysisLevel>latest-All</AnalysisLevel>
32+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
33+
</PropertyGroup>
34+
35+
<!-- Treat warnings as errors are always on when building in release -->
36+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
37+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
38+
</PropertyGroup>
39+
40+
<!-- Shared code analyzers used for all projects in the solution -->
41+
<ItemGroup Label="Code Analyzers">
42+
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
43+
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
44+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.85" PrivateAssets="All" />
45+
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="All" />
46+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
47+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.10.0.77988" PrivateAssets="All" />
48+
</ItemGroup>
49+
50+
</Project>

distribution/dotnet8/global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"rollForward": "latestMajor",
4+
"allowPrerelease": false
5+
}
6+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
4+
# Location: sample
5+
# Distribution: DotNet8
6+
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
7+
8+
##########################################
9+
# Code Analyzers Rules
10+
##########################################
11+
[*.{cs,csx,cake}]
12+
13+
# AsyncFixer
14+
# http://www.asyncfixer.com
15+
16+
17+
# Asyncify
18+
# https://github.com/hvanbakel/Asyncify-CSharp
19+
20+
21+
# Meziantou
22+
# https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm
23+
24+
25+
# Microsoft - Code Analysis
26+
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
27+
28+
29+
# Microsoft - Compiler Errors
30+
# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/
31+
32+
33+
# Microsoft - FxCop
34+
# https://github.com/dotnet/roslyn-analyzers
35+
36+
37+
# SecurityCodeScan
38+
# https://security-code-scan.github.io/
39+
40+
41+
# StyleCop
42+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
43+
44+
45+
##########################################
46+
# Custom - Code Analyzers Rules
47+
##########################################
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!--
5+
Add any shared properties you want for the projects under this directory that need to be set before the auto imported Directory.Build.props
6+
-->
7+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
8+
9+
<!-- Place any common sample properties here -->
10+
11+
</Project>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
4+
# Location: src
5+
# Distribution: DotNet8
6+
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
7+
8+
##########################################
9+
# Code Analyzers Rules
10+
##########################################
11+
[*.{cs,csx,cake}]
12+
13+
# AsyncFixer
14+
# http://www.asyncfixer.com
15+
16+
17+
# Asyncify
18+
# https://github.com/hvanbakel/Asyncify-CSharp
19+
20+
21+
# Meziantou
22+
# https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm
23+
24+
25+
# Microsoft - Code Analysis
26+
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
27+
28+
29+
# Microsoft - Compiler Errors
30+
# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/
31+
32+
33+
# SecurityCodeScan
34+
# https://security-code-scan.github.io/
35+
36+
37+
# StyleCop
38+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
39+
40+
41+
# SonarAnalyzer.CSharp
42+
# https://rules.sonarsource.com/csharp
43+
44+
45+
##########################################
46+
# Custom - Code Analyzers Rules
47+
##########################################
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!--
5+
Add any shared properties you want for the projects under this directory that need to be set before the auto imported Directory.Build.props
6+
-->
7+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
8+
9+
<PropertyGroup Label="Build instructions">
10+
<OutputType>Library</OutputType>
11+
<!-- Creates a regular package and a symbols package -->
12+
<IncludeSymbols>true</IncludeSymbols>
13+
<!-- Creates symbol package in the new .snupkg format -->
14+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
15+
<!--
16+
Instruct the build system to embed project source files that are not tracked by the source control
17+
or imported from a source package to the generated PDB.
18+
-->
19+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
20+
<!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
21+
<DebugType>embedded</DebugType>
22+
</PropertyGroup>
23+
</Project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
2+
# Version: 1.0.0
3+
# Updated: 25-09-2023
4+
# Location: test
5+
# Distribution: DotNet8
6+
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
7+
8+
##########################################
9+
# Code Analyzers Rules
10+
##########################################
11+
[*.{cs,csx,cake}]
12+
13+
# AsyncFixer
14+
# http://www.asyncfixer.com
15+
16+
17+
# Asyncify
18+
# https://github.com/hvanbakel/Asyncify-CSharp
19+
20+
21+
# Meziantou
22+
# https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm
23+
dotnet_diagnostic.MA0004.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0004.md
24+
dotnet_diagnostic.MA0016.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/Meziantou/MA0016.md
25+
26+
27+
# Microsoft - Code Analysis
28+
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
29+
dotnet_diagnostic.CA1068.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
30+
dotnet_diagnostic.CA1707.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
31+
dotnet_diagnostic.CA2007.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
32+
33+
34+
# Microsoft - Compiler Errors
35+
# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/
36+
37+
38+
# SecurityCodeScan
39+
# https://security-code-scan.github.io/
40+
41+
42+
# StyleCop
43+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers
44+
dotnet_diagnostic.SA1122.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1122.md
45+
dotnet_diagnostic.SA1133.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1133.md
46+
47+
48+
# SonarAnalyzer.CSharp
49+
# https://rules.sonarsource.com/csharp
50+
51+
52+
##########################################
53+
# Custom - Code Analyzers Rules
54+
##########################################
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!--
5+
Add any shared properties you want for the projects under this directory that need to be set before the auto imported Directory.Build.props
6+
-->
7+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
8+
9+
<PropertyGroup Label="Compile settings">
10+
<Nullable>annotations</Nullable>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Atc.Test" Version="1.0.79" />
15+
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.15" PrivateAssets="All" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<Using Include="Atc.Test" />
20+
<Using Include="AutoFixture" />
21+
<Using Include="AutoFixture.Xunit2" />
22+
<Using Include="FluentAssertions" />
23+
<Using Include="NSubstitute" />
24+
<Using Include="Xunit" />
25+
</ItemGroup>
26+
27+
</Project>

0 commit comments

Comments
 (0)