Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .net 9 #2369

Merged
merged 7 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 12 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ insert_final_newline = true

# C# files
[*.cs]
dotnet_diagnostic.IDE0055.severity = none

#### Core EditorConfig Options ####

Expand Down Expand Up @@ -123,7 +124,7 @@ csharp_style_expression_bodied_properties = when_on_single_line:silent
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_pattern_matching = true:none
csharp_style_prefer_switch_expression = false:suggestion

csharp_style_prefer_method_group_conversion = true:silent
Expand Down Expand Up @@ -158,7 +159,7 @@ csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:silent
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
csharp_style_unused_value_expression_statement_preference = discard_variable:none

# 'using' directive preferences
csharp_using_directive_placement = inside_namespace:suggestion
Expand Down Expand Up @@ -467,7 +468,7 @@ dotnet_diagnostic.xUnit1044.severity = silent

# CA1716: Identifiers should not match keywords
dotnet_diagnostic.CA1716.severity = none
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_primary_constructors = false:suggestion

# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = silent
Expand All @@ -490,6 +491,13 @@ csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimenta
dotnet_diagnostic.RCS1055.severity = suggestion
dotnet_diagnostic.RCS1039.severity = suggestion
csharp_prefer_static_anonymous_function = true:suggestion
csharp_prefer_system_threading_lock = true:suggestion

# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none

# IDE0078: Use pattern matching
dotnet_diagnostic.IDE0078.severity = none

[*.{cs,vb}]
dotnet_style_coalesce_expression = true:silent
Expand Down Expand Up @@ -536,7 +544,7 @@ dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_namespace_match_folder = false:suggestion
dotnet_style_readonly_field = true:warning
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- language: csharp
build-mode: autobuild
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore ${{ matrix.solution }}
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions common.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageTags>Industrial;Industrial IoT;Manufacturing;Azure;IoT;.NET</PackageTags>
<HighEntropyVA>true</HighEntropyVA>
<NeutralLanguage>en-US</NeutralLanguage>
<LangVersion>11.0</LangVersion>
<LangVersion>13.0</LangVersion>
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
Expand All @@ -34,18 +34,20 @@
</PropertyGroup>
<ItemGroup Condition="$(NO_GIT) == ''">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" PrivateAssets="All"/>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" PrivateAssets="All"/>
</ItemGroup>
<PropertyGroup>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>All</AnalysisMode>
<AnalysisLevel>preview</AnalysisLevel>
<AnalysisModeStyle>default</AnalysisModeStyle>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<!--<TreatWarningsAsErrors>true</TreatWarningsAsErrors>-->
</PropertyGroup>
<ItemGroup Condition="$(NO_RCS) == ''">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.9" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.9" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="4.12.10" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.10" PrivateAssets="All"/>
</ItemGroup>
<!-- only create the SARIF files for the SDL build step in cloud builds -->
<PropertyGroup Condition="'$(NBGV_NugetPackageVersion)' != ''">
Expand Down
Loading
Loading