Skip to content

Commit 17ccc0b

Browse files
authored
Merge pull request #1470 from autofac/feature/net10
- Build updated to run with .NET 10. - Analyzer settings updated for .NET 10. - Update dependencies: - System.Diagnostics.DiagnosticSource 8.0.1 => 10.0.0 - Microsoft.Bcl.AsyncInterfaces 8.0.0 => 10.0.0 - Drop support for `net6.0`, `net7.0`. - Add support for `net10.0`. - Semver => 9.0.0 for breaking framework target changes. - Removed root `NuGet.config` to allow contributor system settings to more easily override package sources if needed. New current set of targets: `net10.0;net8.0;netstandard2.1;netstandard2.0`
2 parents d84199d + 29f5b2a commit 17ccc0b

File tree

21 files changed

+40
-45
lines changed

21 files changed

+40
-45
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
uses: actions/setup-dotnet@v4
1616
with:
1717
dotnet-version: |
18-
6.0.x
19-
7.0.x
2018
8.0.x
19+
10.0.x
2120
- name: Build and test
2221
run: dotnet msbuild ./default.proj
2322
- name: Upload coverage

.github/workflows/dotnet-format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9-
- name: Setup .NET 8
9+
- name: Setup .NET 10
1010
uses: actions/setup-dotnet@v4
1111
with:
12-
dotnet-version: 8.0.x
12+
dotnet-version: 10.0.x
1313
- name: dotnet format
1414
run: dotnet format Autofac.sln --verify-no-changes

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup .NET
1313
uses: actions/setup-dotnet@v4
1414
with:
15-
dotnet-version: 8.0.x
15+
dotnet-version: 10.0.x
1616
- name: Download package artifacts
1717
uses: actions/download-artifact@v4
1818
with:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ repos:
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
1010
- repo: https://github.com/igorshubovych/markdownlint-cli
11-
rev: "586c3ea3f51230da42bab657c6a32e9e66c364f0" # v0.44.0
11+
rev: "192ad822316c3a22fb3d3cc8aa6eafa0b8488360" # v0.45.0
1212
hooks:
1313
- id: markdownlint
1414
args:
1515
- --fix
1616
- repo: https://github.com/tillig/json-sort-cli
17-
rev: "e49ea86dde26d69661d5de4ab738a7e14c6275b2" # v2.0.3
17+
rev: "009ab2ab49e1f2fa9d6b9dfc31009ceeca055204" # v3.0.0
1818
hooks:
1919
- id: json-sort
2020
args:

.vscode/tasks.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"args": [
3232
"build",
3333
"${workspaceFolder}/Autofac.sln",
34+
"--tl:off",
3435
"/property:GenerateFullPaths=true",
3536
"/consoleloggerparameters:NoSummary"
3637
],
@@ -50,9 +51,9 @@
5051
"/property:GenerateFullPaths=true",
5152
"/consoleloggerparameters:NoSummary",
5253
"--results-directory",
53-
"\"artifacts/logs\"",
54+
"artifacts/logs",
5455
"--logger:trx",
55-
"--collect:\"XPlat Code Coverage\"",
56+
"--collect:XPlat Code Coverage",
5657
"--settings:build/Coverage.runsettings",
5758
"--filter",
5859
"FullyQualifiedName!~Benchmark"

NuGet.Config

Lines changed: 0 additions & 11 deletions
This file was deleted.

bench/Autofac.BenchmarkProfiling/Autofac.BenchmarkProfiling.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ImplicitUsings>enable</ImplicitUsings>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
13+
<PackageReference Include="BenchmarkDotNet" Version="0.15.6" />
1414
</ItemGroup>
1515
<ItemGroup>
1616
<ProjectReference Include="..\Autofac.Benchmarks\Autofac.Benchmarks.csproj" />

bench/Autofac.Benchmarks/Autofac.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<None Remove="BenchmarkDotNet.Artifacts\**" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
28+
<PackageReference Include="BenchmarkDotNet" Version="0.15.6" />
2929
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
3030
<PrivateAssets>all</PrivateAssets>
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

build/Source.ruleset

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<Rule Id="CA2229" Action="None" />
2727
<!-- Mark ISerializable types with SerializableAttribute - false positive when building .NET Core. -->
2828
<Rule Id="CA2237" Action="None" />
29+
<!-- Prefer generic overloads to using Type parameters - many aren't available in earlier frameworks; and we do a lot of reflection work in Autofac. -->
30+
<Rule Id="CA2263" Action="None" />
2931
</Rules>
3032
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
3133
<!-- Prefix local calls with this. -->

build/Test.ruleset

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<Rule Id="CA1506" Action="Warning" />
2323
<!-- Use ArgumentNullException.ThrowIfNull - this isn't available until we stop targeting netstandard. -->
2424
<Rule Id="CA1510" Action="None" />
25+
<!-- Make API types internal - causes problems with tests and test assemblies. -->
26+
<Rule Id="CA1515" Action="None" />
2527
<!-- Remove the underscores from member name - unit test scenarios may use underscores. -->
2628
<Rule Id="CA1707" Action="None" />
2729
<!-- Change names to avoid reserved word overlaps (e.g., Delegate, GetType, etc.) - too many of these in the public API, we'd break if we fixed it. -->
@@ -46,6 +48,8 @@
4648
<Rule Id="CA2234" Action="None" />
4749
<!-- Mark ISerializable types with SerializableAttribute - false positive when building .NET Core. -->
4850
<Rule Id="CA2237" Action="None" />
51+
<!-- Prefer generic overloads to using Type parameters - we do a lot of reflection work in Autofac that needs to be tested. -->
52+
<Rule Id="CA2263" Action="None" />
4953
</Rules>
5054
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
5155
<!-- Prefix local calls with this. -->

0 commit comments

Comments
 (0)