Remove CA1060 - Move P/Invokes to `NativeMethods` class
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Native invocations should be moved to different class https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1060
To Reproduce
Open the Wpf.Ui.sln
Select the Build...Clean Solution menu item
Press Ctrl+F5 to build the solution and run it, without connecting the debugger. F5 to build and connect the debugger.
Observe the warnings listed above
Expected behavior
No warnings are generated when building.
Screenshots
No response
OS version
11 2610
.NET version
9.0.200-preview.0.25057.12
WPF-UI NuGet version
4.0.0
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Wpf.Ui.sln and reproduce the CA1060 warnings by cleaning and building without the debugger, as described in the issue. Locate the native invocations reported by the warnings and inspect the relevant classes; done means the P/Invokes are in NativeMethods classes and the solution builds without warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100