Skip to content

Commit

Permalink
Update to .NET (#124)
Browse files Browse the repository at this point in the history
This change updates the project to .NET 9 and removes support for .NET
6. I've also removed the benchmarks project as it's really not
necessary.
  • Loading branch information
craigktreasure authored Nov 17, 2024
1 parent b3152b8 commit e8b7c3d
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 280 deletions.
3 changes: 1 addition & 2 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ runs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
7.x
8.x
9.x
- name: Install .NET tools
shell: pwsh
Expand Down
7 changes: 0 additions & 7 deletions Treasure.Utils.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
version.json = version.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Treasure.Utils.Argument.Benchmarks", "test\Treasure.Utils.Argument.Benchmarks\Treasure.Utils.Argument.Benchmarks.csproj", "{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7C628D75-6B6A-4D42-A4D9-45C6ACA51FB5}"
ProjectSection(SolutionItems) = preProject
src\Directory.Packages.props = src\Directory.Packages.props
Expand All @@ -50,17 +48,12 @@ Global
{EF141707-718F-49EC-99B9-8D7B59CBCCEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF141707-718F-49EC-99B9-8D7B59CBCCEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF141707-718F-49EC-99B9-8D7B59CBCCEF}.Release|Any CPU.Build.0 = Release|Any CPU
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EF141707-718F-49EC-99B9-8D7B59CBCCEF} = {B012001D-4B86-460D-A3E1-FC3EEC840D13}
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86} = {B012001D-4B86-460D-A3E1-FC3EEC840D13}
{7C628D75-6B6A-4D42-A4D9-45C6ACA51FB5} = {A18B8F8E-8296-4968-A569-16F3F4FE045E}
{61D20241-7C98-4A60-AA8D-C7614B7D6768} = {A18B8F8E-8296-4968-A569-16F3F4FE045E}
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion eng/DotNetAnalyzers.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>8.0</AnalysisLevel>
<AnalysisLevel>9.0</AnalysisLevel>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion eng/DotNetDefaults.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- Sets the C# language version:
https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#c-language-version-reference
-->
<LangVersion>12.0</LangVersion>
<LangVersion>latest</LangVersion>

<!-- Enable implicit usings:
https://docs.microsoft.com/dotnet/core/project-sdk/overview#implicit-using-directives
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.100",
"allowPrerelease": false,
"rollForward": "latestFeature"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Treasure.Utils.Argument/Treasure.Utils.Argument.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;netstandard2.1</TargetFrameworks>
<RootNamespace>Treasure.Utils</RootNamespace>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
3 changes: 3 additions & 0 deletions test/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ root = false

[*.cs]

# CA1515: Consider making public types internal
dotnet_diagnostic.CA1515.severity = none

# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = suggestion
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<!-- Setup TFM properties for testing .NET Standard TFM's on supported platforms. -->
<PlatformTFMSuffix Condition="$([MSBuild]::IsOSPlatform('Windows'))">-windows</PlatformTFMSuffix>
<DefaultNetStandardTestTFM >net6.0$(PlatformTFMSuffix)</DefaultNetStandardTestTFM>
<DefaultNetStandardTestTFM >net8.0$(PlatformTFMSuffix)</DefaultNetStandardTestTFM>
</PropertyGroup>

<ItemGroup>
Expand Down
107 changes: 0 additions & 107 deletions test/Treasure.Utils.Argument.Benchmarks/Combine.ps1

This file was deleted.

108 changes: 0 additions & 108 deletions test/Treasure.Utils.Argument.Benchmarks/Program.cs

This file was deleted.

25 changes: 0 additions & 25 deletions test/Treasure.Utils.Argument.Benchmarks/Run.ps1

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);$(DefaultNetStandardTestTFM)</TargetFrameworks>
<RootNamespace>Treasure.Utils.Tests</RootNamespace>
</PropertyGroup>
Expand Down

0 comments on commit e8b7c3d

Please sign in to comment.