Upgrade to .NET 10 and resolve all nullable warnings#6
Open
Aswikinz wants to merge 1 commit intothisismalindu:mainfrom
Open
Upgrade to .NET 10 and resolve all nullable warnings#6Aswikinz wants to merge 1 commit intothisismalindu:mainfrom
Aswikinz wants to merge 1 commit intothisismalindu:mainfrom
Conversation
Upgrade target framework from net6.0-windows to net10.0-windows and add EnableWindowsTargeting for cross-platform build support.Fixed 20 compiler warnings (0 errors) to achieve a clean build.
Target framework:
- SymbolPicker.csproj: net6.0-windows → net10.0-windows
- Add EnableWindowsTargeting property for building on non-Windows hosts
Nullable reference type fixes (CS8618, CS8600, CS8604, CS8625, CS8602):
- Program.cs: Initialize SettingPage and MainForm with null! suppression
since they are assigned in Main() before any access
- Program.cs: Annotate FindWindow lpClassName parameter as string?
- Form1.cs: Make CancellationTokenSource field nullable
- Form1.cs: Replace unsafe (Button)sender cast with pattern match
(if sender is not Button senderButton) for null safety
- Form1.cs: Use Symbol? and Button? for FirstOrDefault() return values
- Form1.cs: Guard addS?.img dereference with fallback to senderButton.Text
- Form1.cs: Pass actual sender/e args instead of null literals to
textBox_search_Leave from keyboard handlers
- Form1.cs: Use MouseEventArgs? for the as-cast in tray click handler
- Settings.cs: Use Dictionary<string, object>? for Deserialize result
- Settings.cs: Use object? for Convert.ChangeType and GetValue results
Naming (CS8981):
- Form1.cs: Rename HotKey.control enum to HotKey.HotkeyModifier to
avoid lowercase-only type name that may conflict with future C# keywords
Unused code (CS0169):
- Settings.Designer.cs: Remove unused checkBox2 field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade target framework from net6.0-windows to net10.0-windows and add EnableWindowsTargeting for cross-platform build support.Fixed 20 compiler warnings (0 errors) to achieve a clean build.
Target framework:
Nullable reference type fixes (CS8618, CS8600, CS8604, CS8625, CS8602):
Naming (CS8981):
Unused code (CS0169):