Skip to content

Commit

Permalink
Use VS2022; use .NET 6; update code style rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeago committed Apr 1, 2022
1 parent d427dc8 commit c4fcd44
Show file tree
Hide file tree
Showing 8 changed files with 939 additions and 342 deletions.
418 changes: 418 additions & 0 deletions .globalconfig

Large diffs are not rendered by default.

23 changes: 19 additions & 4 deletions Cecil.XmlDocNames.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cecil.XmlDocNames", "src\Cecil.XmlDocNames\Cecil.XmlDocNames.csproj", "{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}"
EndProject
Expand All @@ -16,6 +16,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "- Configuration", "- Configuration", "{46B5153B-C518-4A48-BF6B-39989F54BB59}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.globalconfig = .globalconfig
Common.props = Common.props
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Expand All @@ -25,12 +26,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "- Configuration", "- Config
VERSION = VERSION
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{666B431F-DEA5-45E1-A271-84060570A7E8}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{666B431F-DEA5-45E1-A271-84060570A7E8}"
ProjectSection(SolutionItems) = preProject
tests\Common.targets = tests\Common.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cecil.XmlDocNames.Tests", "tests\Cecil.XmlDocNames.Tests\Cecil.XmlDocNames.Tests.csproj", "{C772984C-CAF9-47FD-A478-08D0EA798C32}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExampleAssembly", "testFixtures\ExampleAssembly\ExampleAssembly.csproj", "{EFA5A940-A95E-4BA9-B4B5-EA8E265CBF86}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C568C24-8153-453E-B697-050A899D4BE3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testFixtures", "testFixtures", "{0C479E0D-8D11-4F4A-8195-969BA1821944}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "- Configuration", "- Configuration", "{9CD028C0-4CEC-4CA1-BC92-366E3E397BD3}"
ProjectSection(SolutionItems) = preProject
tests\Common.targets = tests\Common.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -54,8 +67,10 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{62CB2CBD-955F-4020-8CCE-4804D8BCBE30} = {0C568C24-8153-453E-B697-050A899D4BE3}
{C772984C-CAF9-47FD-A478-08D0EA798C32} = {666B431F-DEA5-45E1-A271-84060570A7E8}
{EFA5A940-A95E-4BA9-B4B5-EA8E265CBF86} = {666B431F-DEA5-45E1-A271-84060570A7E8}
{EFA5A940-A95E-4BA9-B4B5-EA8E265CBF86} = {0C479E0D-8D11-4F4A-8195-969BA1821944}
{9CD028C0-4CEC-4CA1-BC92-366E3E397BD3} = {666B431F-DEA5-45E1-A271-84060570A7E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {79026CCC-2B02-4EDF-90C7-E25646EF436E}
Expand Down
795 changes: 481 additions & 314 deletions Cecil.XmlDocNames.sln.DotSettings

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/Cecil.XmlDocNames/Cecil.XmlDocNames.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<!-- Build options -->
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<UseStyleCopAnalyzers>true</UseStyleCopAnalyzers>
<UseJetBrainsAnnotations>true</UseJetBrainsAnnotations>
</PropertyGroup>

Expand All @@ -18,4 +17,4 @@
<PackageReference Include="Mono.Cecil" />
</ItemGroup>

</Project>
</Project>
15 changes: 5 additions & 10 deletions stylecop.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

"settings": {

"indentation": {
"indentationSize": 4,
"tabSize": 4,
"useTabs": false
},

"spacingRules": {
},

Expand All @@ -22,7 +16,7 @@
"elementOrder": [ "kind", "accessibility", "constant", "static", "readonly" ],
"systemUsingDirectivesFirst": true,
"usingDirectivesPlacement": "outsideNamespace",
"blankLinesBetweenUsingGroups": "allow"
"blankLinesBetweenUsingGroups": "omit"
},

"namingRules": {
Expand All @@ -39,18 +33,19 @@

"layoutRules": {
"newlineAtEndOfFile": "require",
"allowConsecutiveUsings": true
"allowConsecutiveUsings": true,
"allowDoWhileOnClosingBrace": true
},

"documentationRules": {
"companyName": "Tenacom",
"copyrightText": "{decoration}\nCopyright (C) {copyrightHolders}. All rights reserved.\nLicensed under the {licenseName} license.\nSee {licenseFile} file in the project root for full license information.\n\nPart of this file may be third-party code, distributed under a compatible license.\nSee {thirdPartyNoticeFile} file in the project root for third-party copyright notices.\n{decoration}",
"copyrightText": "{decoration}\nCopyright (C) {copyrightHolders}. All rights reserved.\nLicensed under the {licenseName} license.\nSee the {licenseFile} file in the project root for full license information.\n\nPart of this file may be third-party code, distributed under a compatible license.\nSee the {thirdPartyNoticeFile} file in the project root for third-party copyright notices.\n{decoration}",
"variables": {
"copyrightHolders": "Riccardo De Agostini and Tenacom",
"licenseName": "MIT",
"licenseFile": "LICENSE",
"thirdPartyNoticeFile": "THIRD-PARTY-NOTICES",
"decoration": "-----------------------------------------------------------------------------------"
"decoration": "---------------------------------------------------------------------------------------"
},
"xmlHeader": false,
"documentInterfaces": true,
Expand Down
12 changes: 9 additions & 3 deletions testFixtures/ExampleAssembly/ExampleAssembly.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<XmlDocs>false</XmlDocs>
<UseJetBrainsAnnotations>false</UseJetBrainsAnnotations>
<UseStyleCopAnalyzers>false</UseStyleCopAnalyzers>
<UsePublicApiAnalyzers>false</UsePublicApiAnalyzers>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -13,4 +11,12 @@
<LiteralAssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage" />
</ItemGroup>

<!-- Suppress warnings triggered by intentionally unclean code -->
<PropertyGroup>
<NoWarn>CA1051;$(NoWarn)</NoWarn> <!-- Do not declare visible instance fields -->
<NoWarn>CA1062;$(NoWarn)</NoWarn> <!-- Validate arguments of public methods -->
<NoWarn>CA1822;$(NoWarn)</NoWarn> <!-- Mark members as static -->
<NoWarn>SA1201;$(NoWarn)</NoWarn> <!-- Elements should appear in the correct order -->
<NoWarn>SA1401;$(NoWarn)</NoWarn> <!-- Fields should be private -->
</PropertyGroup>
</Project>
9 changes: 1 addition & 8 deletions tests/Cecil.XmlDocNames.Tests/Cecil.XmlDocNames.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,11 +16,4 @@
<ProjectReference Include="..\..\testFixtures\ExampleAssembly\ExampleAssembly.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion tests/Common.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<Project>

<PropertyGroup>
<NoWarn>CA1707;$(NoWarn)</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
</Project>

0 comments on commit c4fcd44

Please sign in to comment.