From 812227ed6eb1e2e032f16c720ce4286e03cd4cd5 Mon Sep 17 00:00:00 2001 From: tom-englert Date: Fri, 3 Jul 2026 14:27:09 +0200 Subject: [PATCH 1/6] - tests use net10 target framework - migrate to CPM - update dependencies --- Directory.Packages.props | 26 +++++++++++++++++ .../GlobalUsings.cs | 1 - ...PropertyChanged.Fody.Analyzer.Tests.csproj | 29 +++++++++---------- .../ExtensionMethods.cs | 2 ++ .../PropertyChanged.Fody.Analyzer.csproj | 8 ++--- .../PropertyChanged.Fody.csproj | 2 +- PropertyChanged/PropertyChanged.csproj | 6 ++-- SmokeTest/SmokeTest.csproj | 24 +++++++-------- .../AssemblyExplicitPropertyChanged.csproj | 2 +- .../AssemblyInheritingBadNamedInvoker.csproj | 2 +- .../AssemblyToProcess.csproj | 2 +- .../AssemblyWithAttributeAndEvent.csproj | 2 +- .../AssemblyWithBadNamedInvoker.csproj | 2 +- .../AssemblyWithBase/AssemblyWithBase.csproj | 2 +- .../AssemblyWithBaseInDifferentModule.csproj | 2 +- .../AssemblyWithBeforeAfterInterceptor.csproj | 2 +- .../AssemblyWithBlockingClass.csproj | 2 +- ...DisabledInjectOnPropertyNameChanged.csproj | 2 +- ...semblyWithDisabledIsChangedProperty.csproj | 2 +- ...hDisabledTriggerDependentProperties.csproj | 2 +- .../AssemblyWithExternalInheritance.csproj | 2 +- .../AssemblyWithInheritance.csproj | 2 +- .../AssemblyWithInterceptor.csproj | 2 +- ...blyWithNonVoidOnPropertyNameChanged.csproj | 2 +- .../AssemblyWithStackOverflow.csproj | 2 +- ...mblyWithStaticOnPropertyNameChanged.csproj | 2 +- .../AssemblyWithTypeFilter.csproj | 2 +- Tests/Tests.csproj | 14 ++++----- 28 files changed, 86 insertions(+), 64 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 00000000..ad8d317a --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,26 @@ + + + true + true + $(NoWarn);NU1507 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PropertyChanged.Fody.Analyzer.Tests/GlobalUsings.cs b/PropertyChanged.Fody.Analyzer.Tests/GlobalUsings.cs index bf05afcb..2491a090 100644 --- a/PropertyChanged.Fody.Analyzer.Tests/GlobalUsings.cs +++ b/PropertyChanged.Fody.Analyzer.Tests/GlobalUsings.cs @@ -2,6 +2,5 @@ global using AnalyzerTesting.CSharp.Extensions; global using Microsoft.CodeAnalysis; global using Microsoft.CodeAnalysis.Testing; -global using Microsoft.CodeAnalysis.Testing.Verifiers; global using Microsoft.CodeAnalysis.Text; global using PropertyChanged; \ No newline at end of file diff --git a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj index 97bf6cf9..9700a3b7 100644 --- a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj +++ b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj @@ -1,25 +1,24 @@ - - + - net8.0 + net10.0 enable enable true false - - - - - - - - - - + + + + + + + + + + + - - + \ No newline at end of file diff --git a/PropertyChanged.Fody.Analyzer/ExtensionMethods.cs b/PropertyChanged.Fody.Analyzer/ExtensionMethods.cs index 8ce35981..617547f3 100644 --- a/PropertyChanged.Fody.Analyzer/ExtensionMethods.cs +++ b/PropertyChanged.Fody.Analyzer/ExtensionMethods.cs @@ -101,6 +101,8 @@ public static IEnumerable EnumerateBaseTypes(this INamedTypeSy [Conditional("DEBUG")] public static void DebugBeep() { +#pragma warning disable RS1035 // Do not use APIs banned for analyzers Task.Run(Console.Beep); +#pragma warning restore RS1035 // Do not use APIs banned for analyzers } } diff --git a/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj b/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj index 44b9d23b..9718782b 100644 --- a/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj +++ b/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj @@ -6,8 +6,8 @@ true - - - + + + - + \ No newline at end of file diff --git a/PropertyChanged.Fody/PropertyChanged.Fody.csproj b/PropertyChanged.Fody/PropertyChanged.Fody.csproj index f4329bae..7daf76af 100644 --- a/PropertyChanged.Fody/PropertyChanged.Fody.csproj +++ b/PropertyChanged.Fody/PropertyChanged.Fody.csproj @@ -4,6 +4,6 @@ netstandard2.0 - + \ No newline at end of file diff --git a/PropertyChanged/PropertyChanged.csproj b/PropertyChanged/PropertyChanged.csproj index 4383e323..1a4569ec 100644 --- a/PropertyChanged/PropertyChanged.csproj +++ b/PropertyChanged/PropertyChanged.csproj @@ -15,9 +15,9 @@ $(MSBuildThisFileDirectory)Weaver.props - - - + + + diff --git a/SmokeTest/SmokeTest.csproj b/SmokeTest/SmokeTest.csproj index 8f4c2a71..67af13b8 100644 --- a/SmokeTest/SmokeTest.csproj +++ b/SmokeTest/SmokeTest.csproj @@ -1,33 +1,29 @@ - - net48;net6.0 + net48;net10.0 enable - - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + - false OnPropertyChanged - - + \ No newline at end of file diff --git a/TestAssemblies/AssemblyExplicitPropertyChanged/AssemblyExplicitPropertyChanged.csproj b/TestAssemblies/AssemblyExplicitPropertyChanged/AssemblyExplicitPropertyChanged.csproj index 3948b613..7c982274 100644 --- a/TestAssemblies/AssemblyExplicitPropertyChanged/AssemblyExplicitPropertyChanged.csproj +++ b/TestAssemblies/AssemblyExplicitPropertyChanged/AssemblyExplicitPropertyChanged.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 CS0067 true diff --git a/TestAssemblies/AssemblyInheritingBadNamedInvoker/AssemblyInheritingBadNamedInvoker.csproj b/TestAssemblies/AssemblyInheritingBadNamedInvoker/AssemblyInheritingBadNamedInvoker.csproj index 8945ba78..d6f8cafe 100644 --- a/TestAssemblies/AssemblyInheritingBadNamedInvoker/AssemblyInheritingBadNamedInvoker.csproj +++ b/TestAssemblies/AssemblyInheritingBadNamedInvoker/AssemblyInheritingBadNamedInvoker.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true diff --git a/TestAssemblies/AssemblyToProcess/AssemblyToProcess.csproj b/TestAssemblies/AssemblyToProcess/AssemblyToProcess.csproj index 03b26bb2..10f22932 100644 --- a/TestAssemblies/AssemblyToProcess/AssemblyToProcess.csproj +++ b/TestAssemblies/AssemblyToProcess/AssemblyToProcess.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067;0649 true diff --git a/TestAssemblies/AssemblyWithAttributeAndEvent/AssemblyWithAttributeAndEvent.csproj b/TestAssemblies/AssemblyWithAttributeAndEvent/AssemblyWithAttributeAndEvent.csproj index 86ac2a58..b40a340a 100644 --- a/TestAssemblies/AssemblyWithAttributeAndEvent/AssemblyWithAttributeAndEvent.csproj +++ b/TestAssemblies/AssemblyWithAttributeAndEvent/AssemblyWithAttributeAndEvent.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true diff --git a/TestAssemblies/AssemblyWithBadNamedInvoker/AssemblyWithBadNamedInvoker.csproj b/TestAssemblies/AssemblyWithBadNamedInvoker/AssemblyWithBadNamedInvoker.csproj index 614756e1..39b3cbcc 100644 --- a/TestAssemblies/AssemblyWithBadNamedInvoker/AssemblyWithBadNamedInvoker.csproj +++ b/TestAssemblies/AssemblyWithBadNamedInvoker/AssemblyWithBadNamedInvoker.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true \ No newline at end of file diff --git a/TestAssemblies/AssemblyWithBase/AssemblyWithBase.csproj b/TestAssemblies/AssemblyWithBase/AssemblyWithBase.csproj index 614756e1..39b3cbcc 100644 --- a/TestAssemblies/AssemblyWithBase/AssemblyWithBase.csproj +++ b/TestAssemblies/AssemblyWithBase/AssemblyWithBase.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true \ No newline at end of file diff --git a/TestAssemblies/AssemblyWithBaseInDifferentModule/AssemblyWithBaseInDifferentModule.csproj b/TestAssemblies/AssemblyWithBaseInDifferentModule/AssemblyWithBaseInDifferentModule.csproj index db2b67fd..c796d58a 100644 --- a/TestAssemblies/AssemblyWithBaseInDifferentModule/AssemblyWithBaseInDifferentModule.csproj +++ b/TestAssemblies/AssemblyWithBaseInDifferentModule/AssemblyWithBaseInDifferentModule.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true diff --git a/TestAssemblies/AssemblyWithBeforeAfterInterceptor/AssemblyWithBeforeAfterInterceptor.csproj b/TestAssemblies/AssemblyWithBeforeAfterInterceptor/AssemblyWithBeforeAfterInterceptor.csproj index cdf270cb..49a722f3 100644 --- a/TestAssemblies/AssemblyWithBeforeAfterInterceptor/AssemblyWithBeforeAfterInterceptor.csproj +++ b/TestAssemblies/AssemblyWithBeforeAfterInterceptor/AssemblyWithBeforeAfterInterceptor.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithBlockingClass/AssemblyWithBlockingClass.csproj b/TestAssemblies/AssemblyWithBlockingClass/AssemblyWithBlockingClass.csproj index 9cf53932..1d6357e4 100644 --- a/TestAssemblies/AssemblyWithBlockingClass/AssemblyWithBlockingClass.csproj +++ b/TestAssemblies/AssemblyWithBlockingClass/AssemblyWithBlockingClass.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true \ No newline at end of file diff --git a/TestAssemblies/AssemblyWithDisabledInjectOnPropertyNameChanged/AssemblyWithDisabledInjectOnPropertyNameChanged.csproj b/TestAssemblies/AssemblyWithDisabledInjectOnPropertyNameChanged/AssemblyWithDisabledInjectOnPropertyNameChanged.csproj index 838b2e66..3f4f08a3 100644 --- a/TestAssemblies/AssemblyWithDisabledInjectOnPropertyNameChanged/AssemblyWithDisabledInjectOnPropertyNameChanged.csproj +++ b/TestAssemblies/AssemblyWithDisabledInjectOnPropertyNameChanged/AssemblyWithDisabledInjectOnPropertyNameChanged.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithDisabledIsChangedProperty/AssemblyWithDisabledIsChangedProperty.csproj b/TestAssemblies/AssemblyWithDisabledIsChangedProperty/AssemblyWithDisabledIsChangedProperty.csproj index 838b2e66..3f4f08a3 100644 --- a/TestAssemblies/AssemblyWithDisabledIsChangedProperty/AssemblyWithDisabledIsChangedProperty.csproj +++ b/TestAssemblies/AssemblyWithDisabledIsChangedProperty/AssemblyWithDisabledIsChangedProperty.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithDisabledTriggerDependentProperties/AssemblyWithDisabledTriggerDependentProperties.csproj b/TestAssemblies/AssemblyWithDisabledTriggerDependentProperties/AssemblyWithDisabledTriggerDependentProperties.csproj index 838b2e66..3f4f08a3 100644 --- a/TestAssemblies/AssemblyWithDisabledTriggerDependentProperties/AssemblyWithDisabledTriggerDependentProperties.csproj +++ b/TestAssemblies/AssemblyWithDisabledTriggerDependentProperties/AssemblyWithDisabledTriggerDependentProperties.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithExternalInheritance/AssemblyWithExternalInheritance.csproj b/TestAssemblies/AssemblyWithExternalInheritance/AssemblyWithExternalInheritance.csproj index 11a0855f..51625c45 100644 --- a/TestAssemblies/AssemblyWithExternalInheritance/AssemblyWithExternalInheritance.csproj +++ b/TestAssemblies/AssemblyWithExternalInheritance/AssemblyWithExternalInheritance.csproj @@ -1,6 +1,6 @@ - net48;net6.0 + net48;net10.0 0067;0649 true diff --git a/TestAssemblies/AssemblyWithInheritance/AssemblyWithInheritance.csproj b/TestAssemblies/AssemblyWithInheritance/AssemblyWithInheritance.csproj index 201f237b..de98e204 100644 --- a/TestAssemblies/AssemblyWithInheritance/AssemblyWithInheritance.csproj +++ b/TestAssemblies/AssemblyWithInheritance/AssemblyWithInheritance.csproj @@ -1,6 +1,6 @@ - net48;net6.0 + net48;net10.0 0067;0649 true diff --git a/TestAssemblies/AssemblyWithInterceptor/AssemblyWithInterceptor.csproj b/TestAssemblies/AssemblyWithInterceptor/AssemblyWithInterceptor.csproj index cdf270cb..49a722f3 100644 --- a/TestAssemblies/AssemblyWithInterceptor/AssemblyWithInterceptor.csproj +++ b/TestAssemblies/AssemblyWithInterceptor/AssemblyWithInterceptor.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithNonVoidOnPropertyNameChanged/AssemblyWithNonVoidOnPropertyNameChanged.csproj b/TestAssemblies/AssemblyWithNonVoidOnPropertyNameChanged/AssemblyWithNonVoidOnPropertyNameChanged.csproj index cdf270cb..49a722f3 100644 --- a/TestAssemblies/AssemblyWithNonVoidOnPropertyNameChanged/AssemblyWithNonVoidOnPropertyNameChanged.csproj +++ b/TestAssemblies/AssemblyWithNonVoidOnPropertyNameChanged/AssemblyWithNonVoidOnPropertyNameChanged.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithStackOverflow/AssemblyWithStackOverflow.csproj b/TestAssemblies/AssemblyWithStackOverflow/AssemblyWithStackOverflow.csproj index db2b67fd..c796d58a 100644 --- a/TestAssemblies/AssemblyWithStackOverflow/AssemblyWithStackOverflow.csproj +++ b/TestAssemblies/AssemblyWithStackOverflow/AssemblyWithStackOverflow.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 true diff --git a/TestAssemblies/AssemblyWithStaticOnPropertyNameChanged/AssemblyWithStaticOnPropertyNameChanged.csproj b/TestAssemblies/AssemblyWithStaticOnPropertyNameChanged/AssemblyWithStaticOnPropertyNameChanged.csproj index 38778116..d7af9d9a 100644 --- a/TestAssemblies/AssemblyWithStaticOnPropertyNameChanged/AssemblyWithStaticOnPropertyNameChanged.csproj +++ b/TestAssemblies/AssemblyWithStaticOnPropertyNameChanged/AssemblyWithStaticOnPropertyNameChanged.csproj @@ -1,6 +1,6 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/TestAssemblies/AssemblyWithTypeFilter/AssemblyWithTypeFilter.csproj b/TestAssemblies/AssemblyWithTypeFilter/AssemblyWithTypeFilter.csproj index 9ec3dbe0..45c58e7c 100644 --- a/TestAssemblies/AssemblyWithTypeFilter/AssemblyWithTypeFilter.csproj +++ b/TestAssemblies/AssemblyWithTypeFilter/AssemblyWithTypeFilter.csproj @@ -1,7 +1,7 @@  - net48;net6.0 + net48;net10.0 0067 true diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 4f3ebde1..a0d22747 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,18 +1,18 @@ - net48;net6.0 + net48;net10.0 true - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -37,4 +37,4 @@ - + \ No newline at end of file From 447a7774948ad5e4a3c564cc86292f2b7c564bb7 Mon Sep 17 00:00:00 2001 From: tom-englert Date: Fri, 3 Jul 2026 14:50:12 +0200 Subject: [PATCH 2/6] Fix AssemblyFSharp references --- TestAssemblies/AssemblyFSharp/AssemblyFSharp.fsproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestAssemblies/AssemblyFSharp/AssemblyFSharp.fsproj b/TestAssemblies/AssemblyFSharp/AssemblyFSharp.fsproj index afbbcd65..ffc371b7 100644 --- a/TestAssemblies/AssemblyFSharp/AssemblyFSharp.fsproj +++ b/TestAssemblies/AssemblyFSharp/AssemblyFSharp.fsproj @@ -10,7 +10,7 @@ - - + + \ No newline at end of file From 86ec59f8883a26142fe2aef37853e8a7423ccb30 Mon Sep 17 00:00:00 2001 From: tom-englert Date: Fri, 3 Jul 2026 14:59:43 +0200 Subject: [PATCH 3/6] Pin Microsoft.CodeAnalysis.* packages to version compatible with any VS version --- .../PropertyChanged.Fody.Analyzer.csproj | 4 ++-- PropertyChanged.sln | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj b/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj index 9718782b..9846df60 100644 --- a/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj +++ b/PropertyChanged.Fody.Analyzer/PropertyChanged.Fody.Analyzer.csproj @@ -6,8 +6,8 @@ true - - + + \ No newline at end of file diff --git a/PropertyChanged.sln b/PropertyChanged.sln index 8df177d2..13406cba 100644 --- a/PropertyChanged.sln +++ b/PropertyChanged.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.2.32630.192 +# Visual Studio Version 18 +VisualStudioVersion = 18.8.11925.187 insiders MinimumVisualStudioVersion = 16.0.29201.188 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssemblies", "TestAssemblies", "{546A6338-E25E-4796-AF08-A4742E3BDF7B}" EndProject @@ -45,8 +45,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig appveyor.yml = appveyor.yml Directory.Build.props = Directory.Build.props - readme.md = readme.md + Directory.Packages.props = Directory.Packages.props global.json = global.json + readme.md = readme.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyWithAttributeAndEvent", "TestAssemblies\AssemblyWithAttributeAndEvent\AssemblyWithAttributeAndEvent.csproj", "{B28F547A-87F9-4F65-96DC-7911DEAB07AA}" From 8fe7acfc6448583103de7518a68a01685899f823 Mon Sep 17 00:00:00 2001 From: tom-englert Date: Fri, 3 Jul 2026 14:42:27 +0200 Subject: [PATCH 4/6] Upgrade xunit to v3 --- Directory.Packages.props | 4 +- .../CodeGeneratorTest.cs | 56 +++++++++---------- ...PropertyChanged.Fody.Analyzer.Tests.csproj | 5 +- SmokeTest/SmokeTest.csproj | 5 +- Tests/AssemblyToProcessTests.cs | 3 +- .../AssemblyWithBaseInDifferentModuleTests.cs | 2 + ...isabledInjectOnPropertyNameChangedTests.cs | 2 + ...emblyWithDisabledIsChangedPropertyTests.cs | 2 + ...DisabledTriggerDependentPropertiesTests.cs | 2 + Tests/AssemblyWithInheritanceTests.cs | 2 - Tests/FSharpTest.cs | 2 + Tests/Tests.csproj | 5 +- Tests/TypeFilterTests.cs | 4 +- 13 files changed, 54 insertions(+), 40 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ad8d317a..5b343c17 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -19,8 +19,8 @@ - - + + \ No newline at end of file diff --git a/PropertyChanged.Fody.Analyzer.Tests/CodeGeneratorTest.cs b/PropertyChanged.Fody.Analyzer.Tests/CodeGeneratorTest.cs index 426b7b55..4109a6ff 100644 --- a/PropertyChanged.Fody.Analyzer.Tests/CodeGeneratorTest.cs +++ b/PropertyChanged.Fody.Analyzer.Tests/CodeGeneratorTest.cs @@ -25,7 +25,7 @@ public class Class1 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -46,7 +46,7 @@ public partial class Class1 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -65,7 +65,7 @@ public partial class Class1 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -85,10 +85,10 @@ public partial record Class1 : {|#0:INotifyPropertyChanged|} """; var test = new Test(source) { - ExpectedDiagnostics = {CS0535.WithArguments("Class1", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged")} + ExpectedDiagnostics = { CS0535.WithArguments("Class1", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged") } }; - var generated = await test.RunAsync(); + var generated = await test.RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -105,7 +105,7 @@ public partial class Class1 : System.ComponentModel.INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -124,7 +124,7 @@ public partial class Class1 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -147,7 +147,7 @@ public partial class Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -176,7 +176,7 @@ public partial class Class1 } """; - var generated = await new Test(source1, source2).RunAsync(); + var generated = await new Test(source1, source2).RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -204,7 +204,7 @@ public partial class Class1 : INotifyPropertyChanged } """; - var generated = await new Test(source1, source2).RunAsync(); + var generated = await new Test(source1, source2).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -234,7 +234,7 @@ public partial class Class1234 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -255,10 +255,10 @@ public partial struct Class1 : {|#0:INotifyPropertyChanged|} """; var test = new Test(source) { - ExpectedDiagnostics = {CS0535.WithArguments("Class1", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged")} + ExpectedDiagnostics = { CS0535.WithArguments("Class1", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged") } }; - var generated = await test.RunAsync(); + var generated = await test.RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -278,7 +278,7 @@ public partial class Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -298,7 +298,7 @@ public partial record Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } @@ -320,7 +320,7 @@ public partial class Class1 : Attribute, INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -345,7 +345,7 @@ public partial class Class2 : Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -370,7 +370,7 @@ public partial class Class2 : Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -392,7 +392,7 @@ public partial class Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -412,7 +412,7 @@ public partial class Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -432,7 +432,7 @@ public sealed partial class Class1 } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -489,7 +489,7 @@ public partial class Class2a : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -522,7 +522,7 @@ public partial class Class3 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -548,7 +548,7 @@ public partial class Class2 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -574,7 +574,7 @@ public partial class Class2 : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -608,7 +608,7 @@ partial class Class : INotifyPropertyChanged } """; - var generated = await new Test(source).RunAsync(); + var generated = await new Test(source).RunAsync(TestContext.Current.CancellationToken); await Verify(generated); } @@ -641,10 +641,10 @@ public partial class Class3 : {|#0:INotifyPropertyChanged|} """; var test = new Test(source) { - ExpectedDiagnostics = {CS0535.WithArguments("Class1.Class2.Class3", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged")} + ExpectedDiagnostics = { CS0535.WithArguments("Class1.Class2.Class3", "System.ComponentModel.INotifyPropertyChanged.PropertyChanged") } }; - var generated = await test.RunAsync(); + var generated = await test.RunAsync(TestContext.Current.CancellationToken); Assert.Empty(generated); } diff --git a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj index 9700a3b7..198cd506 100644 --- a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj +++ b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj @@ -5,6 +5,7 @@ enable true false + Exe @@ -12,8 +13,8 @@ - - + + diff --git a/SmokeTest/SmokeTest.csproj b/SmokeTest/SmokeTest.csproj index 67af13b8..7d23ee3c 100644 --- a/SmokeTest/SmokeTest.csproj +++ b/SmokeTest/SmokeTest.csproj @@ -2,11 +2,12 @@ net48;net10.0 enable + Exe - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/AssemblyToProcessTests.cs b/Tests/AssemblyToProcessTests.cs index 816a7323..1fe012d4 100644 --- a/Tests/AssemblyToProcessTests.cs +++ b/Tests/AssemblyToProcessTests.cs @@ -5,7 +5,8 @@ using ComplexHierarchy; using Mono.Cecil; using Mono.Cecil.Cil; -using Xunit.Abstractions; + +using TestResult = Fody.TestResult; public class AssemblyToProcessTests(ITestOutputHelper outputHelper) { diff --git a/Tests/AssemblyWithBaseInDifferentModuleTests.cs b/Tests/AssemblyWithBaseInDifferentModuleTests.cs index f4f350ea..ee3359c4 100644 --- a/Tests/AssemblyWithBaseInDifferentModuleTests.cs +++ b/Tests/AssemblyWithBaseInDifferentModuleTests.cs @@ -2,6 +2,8 @@ using Mono.Cecil; using Mono.Cecil.Cil; +using TestResult = Fody.TestResult; + public class AssemblyWithBaseInDifferentModuleTests { TestResult testResult; diff --git a/Tests/AssemblyWithDisabledInjectOnPropertyNameChangedTests.cs b/Tests/AssemblyWithDisabledInjectOnPropertyNameChangedTests.cs index 68bc675a..31102590 100644 --- a/Tests/AssemblyWithDisabledInjectOnPropertyNameChangedTests.cs +++ b/Tests/AssemblyWithDisabledInjectOnPropertyNameChangedTests.cs @@ -1,3 +1,5 @@ +using TestResult = Fody.TestResult; + public class AssemblyWithDisabledInjectOnPropertyNameChangedTests { static TestResult testResult; diff --git a/Tests/AssemblyWithDisabledIsChangedPropertyTests.cs b/Tests/AssemblyWithDisabledIsChangedPropertyTests.cs index 04264035..282cc03e 100644 --- a/Tests/AssemblyWithDisabledIsChangedPropertyTests.cs +++ b/Tests/AssemblyWithDisabledIsChangedPropertyTests.cs @@ -1,3 +1,5 @@ +using TestResult = Fody.TestResult; + public class AssemblyWithDisabledIsChangedPropertyTests { static TestResult testResult; diff --git a/Tests/AssemblyWithDisabledTriggerDependentPropertiesTests.cs b/Tests/AssemblyWithDisabledTriggerDependentPropertiesTests.cs index 1c4e11df..2045f63d 100644 --- a/Tests/AssemblyWithDisabledTriggerDependentPropertiesTests.cs +++ b/Tests/AssemblyWithDisabledTriggerDependentPropertiesTests.cs @@ -1,3 +1,5 @@ +using TestResult = Fody.TestResult; + public class AssemblyWithDisabledTriggerDependentPropertiesTests { static TestResult testResult; diff --git a/Tests/AssemblyWithInheritanceTests.cs b/Tests/AssemblyWithInheritanceTests.cs index 102dfa6f..10f3d026 100644 --- a/Tests/AssemblyWithInheritanceTests.cs +++ b/Tests/AssemblyWithInheritanceTests.cs @@ -5,8 +5,6 @@ using System.Runtime.Loader; #endif -using Xunit.Abstractions; - public class AssemblyWithInheritanceTests(ITestOutputHelper outputHelper) { static AssemblyWithInheritanceTests() diff --git a/Tests/FSharpTest.cs b/Tests/FSharpTest.cs index a72edc7f..f9438f2f 100644 --- a/Tests/FSharpTest.cs +++ b/Tests/FSharpTest.cs @@ -1,3 +1,5 @@ +using TestResult = Fody.TestResult; + public class FSharpTest { TestResult testResult; diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index a0d22747..26583ef0 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -3,11 +3,12 @@ net48;net10.0 true + Exe - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/TypeFilterTests.cs b/Tests/TypeFilterTests.cs index 74218640..cce68150 100644 --- a/Tests/TypeFilterTests.cs +++ b/Tests/TypeFilterTests.cs @@ -1,4 +1,6 @@ -public class TypeFilterTests +using TestResult = Fody.TestResult; + +public class TypeFilterTests { TestResult testResult; From e4f6ba45f0baf07ae59b0c94f4b2aa8fd8ca3efe Mon Sep 17 00:00:00 2001 From: tom-englert Date: Sat, 4 Jul 2026 14:45:36 +0200 Subject: [PATCH 5/6] Remove redundant package references --- Directory.Packages.props | 4 ---- .../PropertyChanged.Fody.Analyzer.Tests.csproj | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5b343c17..8a22a3e1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,14 +6,10 @@ - - - - diff --git a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj index 198cd506..35864787 100644 --- a/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj +++ b/PropertyChanged.Fody.Analyzer.Tests/PropertyChanged.Fody.Analyzer.Tests.csproj @@ -9,14 +9,10 @@ - - - - From 27697de53ed92297ce1245497628db2783a847dd Mon Sep 17 00:00:00 2001 From: tom-englert Date: Sat, 4 Jul 2026 15:23:29 +0200 Subject: [PATCH 6/6] Update dependencies --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8a22a3e1..b11d9021 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ $(NoWarn);NU1507 - +