Skip to content

Commit 5df497d

Browse files
Fix 'FieldInfo.IsNotSerialized' is obsolete: 'Formatter-based serialization is obsolete and should not be used.'
1 parent 7c18f51 commit 5df497d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/dotnet.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build:
1111

12-
runs-on: windows-2022
12+
runs-on: windows-latest
1313
strategy:
1414
matrix:
1515
Configuration: [ Debug, Release ]
@@ -28,16 +28,16 @@ jobs:
2828
assemblyVersion: ${{ env.BuildVersion }}.${{ github.run_number }}
2929
fileVersion: ${{ env.BuildVersion }}.${{ github.run_number }}
3030

31-
- name: Setup .NET LTS Current
32-
uses: actions/setup-dotnet@v5
33-
with:
34-
dotnet-version: '10.0.x'
35-
3631
- name: Setup .NET LTS Previous
3732
uses: actions/setup-dotnet@v5
3833
with:
3934
dotnet-version: '8.0.x'
4035

36+
- name: Setup .NET LTS Current
37+
uses: actions/setup-dotnet@v5
38+
with:
39+
dotnet-version: '10.0.x'
40+
4141
- name: Add msbuild to PATH
4242
uses: microsoft/setup-msbuild@v2
4343

ICSharpCode.AvalonEdit/TextEditorOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public TextEditorOptions(TextEditorOptions options)
4747

4848
// copy each value over to 'this'
4949
foreach (FieldInfo fi in fields) {
50-
if (!fi.IsNotSerialized)
50+
if (fi.GetCustomAttribute<NonSerializedAttribute>() == null)
5151
fi.SetValue(this, fi.GetValue(options));
5252
}
5353
}
@@ -391,7 +391,7 @@ public virtual bool EnableVirtualSpace {
391391
set {
392392
if (enableVirtualSpace != value) {
393393
enableVirtualSpace = value;
394-
OnPropertyChanged("EnableVirtualSpace");
394+
OnPropertyChanged("EnableVirtualSpace");
395395
}
396396
}
397397
}

0 commit comments

Comments
 (0)