From abfeb9d8d3d69727dd800bb60071fd6ffe8c21de Mon Sep 17 00:00:00 2001 From: Alistair Evans Date: Sat, 10 Dec 2022 11:09:13 +0000 Subject: [PATCH 1/5] Use net7.0 in the global json file --- global.json | 5 +++-- src/Autofac/Autofac.csproj | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index dd9d68c77..504ea16e7 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,12 @@ { "sdk": { - "version": "6.0.200", + "version": "7.0.100", "rollForward": "latestFeature" }, "additionalSdks": [ "3.1.416", - "5.0.405" + "5.0.405", + "6.0.200" ] } diff --git a/src/Autofac/Autofac.csproj b/src/Autofac/Autofac.csproj index 902145a2b..b33cb5294 100644 --- a/src/Autofac/Autofac.csproj +++ b/src/Autofac/Autofac.csproj @@ -94,7 +94,7 @@ MSBuild:Compile CSharp - $(IntermediateOutputPath)\%(Filename).Designer.cs + $(IntermediateOutputPath)%(Filename).Designer.cs %(Filename) From 8c511d0beea33c5fd1187ecb62a43b1d3964b91c Mon Sep 17 00:00:00 2001 From: Alistair Evans Date: Sat, 10 Dec 2022 11:17:35 +0000 Subject: [PATCH 2/5] Remove net5 support (out of support) --- src/Autofac/Autofac.csproj | 2 +- .../Autofac.Specification.Test.csproj | 2 +- test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj | 2 +- test/Autofac.Test/Autofac.Test.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Autofac/Autofac.csproj b/src/Autofac/Autofac.csproj index b33cb5294..3993e62e2 100644 --- a/src/Autofac/Autofac.csproj +++ b/src/Autofac/Autofac.csproj @@ -15,7 +15,7 @@ true en-US - net6.0;net5.0;netstandard2.1;netstandard2.0; + net6.0;netstandard2.1;netstandard2.0; latest enable $(NoWarn);CS1591 diff --git a/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj b/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj index f83aed018..f5d154254 100644 --- a/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj +++ b/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj @@ -1,7 +1,7 @@  - net6.0;net5.0;netcoreapp3.1; + net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../build/Test.ruleset diff --git a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj index 791d93590..ea8f03148 100644 --- a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj +++ b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj @@ -1,7 +1,7 @@  - net6.0;net5.0;netcoreapp3.1; + net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../Autofac.snk diff --git a/test/Autofac.Test/Autofac.Test.csproj b/test/Autofac.Test/Autofac.Test.csproj index 4fb779ece..02948af0e 100644 --- a/test/Autofac.Test/Autofac.Test.csproj +++ b/test/Autofac.Test/Autofac.Test.csproj @@ -1,7 +1,7 @@  - net6.0;net5.0;netcoreapp3.1; + net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../Autofac.snk From 2830fe1a18e12bf76d0a3241221f8d67f139a39e Mon Sep 17 00:00:00 2001 From: Alistair Evans Date: Sat, 10 Dec 2022 11:33:09 +0000 Subject: [PATCH 3/5] Add the dotnet tfm; update some analyser/test packages. --- .../Autofac.BenchmarkProfiling.csproj | 2 +- .../Autofac.Benchmarks/Autofac.Benchmarks.csproj | 8 ++++---- codegen/Autofac.CodeGen/Autofac.CodeGen.csproj | 2 +- src/Autofac/Autofac.csproj | 7 ++----- .../Autofac.Specification.Test.csproj | 12 ++++++------ .../Autofac.Test.CodeGen.csproj | 16 ++++++++-------- ...atorTests.VerifyGeneratedCode#00.verified.cs} | 0 ...atorTests.VerifyGeneratedCode#01.verified.cs} | 0 .../Autofac.Test.Compilation.csproj | 12 ++++++------ test/Autofac.Test/Autofac.Test.csproj | 14 +++++++------- 10 files changed, 35 insertions(+), 38 deletions(-) rename test/Autofac.Test.CodeGen/Snapshots/{DelegateRegisterGeneratorTests.VerifyGeneratedCode.00.verified.cs => DelegateRegisterGeneratorTests.VerifyGeneratedCode#00.verified.cs} (100%) rename test/Autofac.Test.CodeGen/Snapshots/{DelegateRegisterGeneratorTests.VerifyGeneratedCode.01.verified.cs => DelegateRegisterGeneratorTests.VerifyGeneratedCode#01.verified.cs} (100%) diff --git a/bench/Autofac.BenchmarkProfiling/Autofac.BenchmarkProfiling.csproj b/bench/Autofac.BenchmarkProfiling/Autofac.BenchmarkProfiling.csproj index c8aa928af..248ba87d6 100644 --- a/bench/Autofac.BenchmarkProfiling/Autofac.BenchmarkProfiling.csproj +++ b/bench/Autofac.BenchmarkProfiling/Autofac.BenchmarkProfiling.csproj @@ -8,7 +8,7 @@ - + diff --git a/bench/Autofac.Benchmarks/Autofac.Benchmarks.csproj b/bench/Autofac.Benchmarks/Autofac.Benchmarks.csproj index ff4d2a52d..eb53fe099 100644 --- a/bench/Autofac.Benchmarks/Autofac.Benchmarks.csproj +++ b/bench/Autofac.Benchmarks/Autofac.Benchmarks.csproj @@ -34,10 +34,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers diff --git a/codegen/Autofac.CodeGen/Autofac.CodeGen.csproj b/codegen/Autofac.CodeGen/Autofac.CodeGen.csproj index 9351df50f..c534ad33a 100644 --- a/codegen/Autofac.CodeGen/Autofac.CodeGen.csproj +++ b/codegen/Autofac.CodeGen/Autofac.CodeGen.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/Autofac/Autofac.csproj b/src/Autofac/Autofac.csproj index 3993e62e2..7a9998f7e 100644 --- a/src/Autofac/Autofac.csproj +++ b/src/Autofac/Autofac.csproj @@ -15,7 +15,7 @@ true en-US - net6.0;netstandard2.1;netstandard2.0; + net7.0;net6.0;netstandard2.1;netstandard2.0; latest enable $(NoWarn);CS1591 @@ -71,10 +71,7 @@ - - all - - + all diff --git a/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj b/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj index f5d154254..c80b9e7ea 100644 --- a/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj +++ b/test/Autofac.Specification.Test/Autofac.Specification.Test.csproj @@ -1,7 +1,7 @@  - net6.0;netcoreapp3.1; + net7.0;net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../build/Test.ruleset @@ -30,20 +30,20 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all - - + + all runtime; build; native; contentfiles; analyzers diff --git a/test/Autofac.Test.CodeGen/Autofac.Test.CodeGen.csproj b/test/Autofac.Test.CodeGen/Autofac.Test.CodeGen.csproj index d8efa8d3e..6e241393c 100644 --- a/test/Autofac.Test.CodeGen/Autofac.Test.CodeGen.csproj +++ b/test/Autofac.Test.CodeGen/Autofac.Test.CodeGen.csproj @@ -33,26 +33,26 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all - - + + all runtime; build; native; contentfiles; analyzers - - + + diff --git a/test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode.00.verified.cs b/test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode#00.verified.cs similarity index 100% rename from test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode.00.verified.cs rename to test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode#00.verified.cs diff --git a/test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode.01.verified.cs b/test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode#01.verified.cs similarity index 100% rename from test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode.01.verified.cs rename to test/Autofac.Test.CodeGen/Snapshots/DelegateRegisterGeneratorTests.VerifyGeneratedCode#01.verified.cs diff --git a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj index ea8f03148..4c2bbc36f 100644 --- a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj +++ b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj @@ -32,21 +32,21 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all - - + + all runtime; build; native; contentfiles; analyzers diff --git a/test/Autofac.Test/Autofac.Test.csproj b/test/Autofac.Test/Autofac.Test.csproj index 02948af0e..e8ac95e95 100644 --- a/test/Autofac.Test/Autofac.Test.csproj +++ b/test/Autofac.Test/Autofac.Test.csproj @@ -1,7 +1,7 @@  - net6.0;netcoreapp3.1; + net7.0;net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../Autofac.snk @@ -34,21 +34,21 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all - - + + all runtime; build; native; contentfiles; analyzers From 737de9e1a315093e2c2a6a2ffda7d1548be7a8b0 Mon Sep 17 00:00:00 2001 From: Alistair Evans Date: Sun, 11 Dec 2022 10:50:18 +0000 Subject: [PATCH 4/5] PR feedback. --- global.json | 5 ++--- src/Autofac/Autofac.csproj | 3 --- .../Autofac.Test.Compilation/Autofac.Test.Compilation.csproj | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index 504ea16e7..1982217ab 100644 --- a/global.json +++ b/global.json @@ -5,8 +5,7 @@ }, "additionalSdks": [ - "3.1.416", - "5.0.405", - "6.0.200" + "3.1.425", + "6.0.403" ] } diff --git a/src/Autofac/Autofac.csproj b/src/Autofac/Autofac.csproj index 7a9998f7e..c6d394b5d 100644 --- a/src/Autofac/Autofac.csproj +++ b/src/Autofac/Autofac.csproj @@ -71,9 +71,6 @@ - - all - all diff --git a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj index 4c2bbc36f..ce93b4f6c 100644 --- a/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj +++ b/test/Autofac.Test.Compilation/Autofac.Test.Compilation.csproj @@ -1,7 +1,7 @@  - net6.0;netcoreapp3.1; + net7.0;net6.0;netcoreapp3.1; $(NoWarn);CS1591 true ../../Autofac.snk From a68bef756d5989824b06b224be925bdf436d37f9 Mon Sep 17 00:00:00 2001 From: Alistair Evans Date: Sun, 11 Dec 2022 10:51:33 +0000 Subject: [PATCH 5/5] Remove unrequired Directory.Build.targets --- Autofac.sln | 3 +-- Directory.Build.targets | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 Directory.Build.targets diff --git a/Autofac.sln b/Autofac.sln index 306e80a78..1ee85489b 100644 --- a/Autofac.sln +++ b/Autofac.sln @@ -18,7 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution build.ps1 = build.ps1 codecov.yml = codecov.yml Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets global.json = global.json NuGet.Config = NuGet.Config EndProjectSection @@ -51,7 +50,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Autofac.BenchmarkProfiling" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "codegen", "codegen", "{1FE012DB-9231-4F74-A38B-EC7B050CC0A3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autofac.CodeGen", "codegen\Autofac.CodeGen\Autofac.CodeGen.csproj", "{5E86E12F-DB5A-4E96-80C7-7FC7791C5DD2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Autofac.CodeGen", "codegen\Autofac.CodeGen\Autofac.CodeGen.csproj", "{5E86E12F-DB5A-4E96-80C7-7FC7791C5DD2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Autofac.Test.CodeGen", "test\Autofac.Test.CodeGen\Autofac.Test.CodeGen.csproj", "{A651B51E-3CDE-410F-9354-6DB9A5A9B591}" EndProject diff --git a/Directory.Build.targets b/Directory.Build.targets deleted file mode 100644 index 341027f3c..000000000 --- a/Directory.Build.targets +++ /dev/null @@ -1,3 +0,0 @@ - - -