Repository navigation
Multi-target for .NET Framework 4.8 + .NET 8, 9 and 10 - #7
Conversation
|
Neat! Sorry I did not see this coming in, as my GitHub Notifications system is often not working well. I was just now working on updating dependency chains anyway when I noticed this. I hope to get this fully reviewed, tested, and merged this weekend. |
There was a problem hiding this comment.
Pull request overview
This PR converts the repository’s legacy C# project files to SDK-style projects and expands the three reusable input libraries to multi-target modern Windows TFMs alongside .NET Framework. It fits the codebase by modernizing build configuration for the existing SimWinMouse, SimWinKeyboard, SimWinGamePad libraries and the SimExamples sample app.
Changes:
- Convert all four projects from legacy MSBuild
.csprojformat to SDK-style projects. - Multi-target the three library projects for
net48,net8.0-windows,net9.0-windows, andnet10.0-windows. - Retarget the WPF sample app to
net9.0-windowsand simplify its project references.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
SimWinMouse/SimWinMouse.csproj |
Converts the mouse library project to SDK-style and adds multi-target Windows TFMs. |
SimWinKeyboard/SimWinKeyboard.csproj |
Converts the keyboard library project to SDK-style and adds multi-target Windows TFMs. |
SimWinGamePad/SimWinGamePad.csproj |
Converts the gamepad library project to SDK-style, adds multi-targeting, and preserves embedded resource setup. |
SimExamples/SimExamples.csproj |
Converts the sample WPF app to SDK-style, retargets it to net9.0-windows, and simplifies project references. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>SimWinMouse</RootNamespace> | ||
| <TargetFrameworks>net48;net8.0-windows;net9.0-windows;net10.0-windows</TargetFrameworks> |
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>SimWinKeyboard</RootNamespace> | ||
| <TargetFrameworks>net48;net8.0-windows;net9.0-windows;net10.0-windows</TargetFrameworks> |
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <Nullable>disable</Nullable> | ||
| <ImplicitUsings>disable</ImplicitUsings> | ||
| <UseWPF>true</UseWPF> |
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <Nullable>disable</Nullable> | ||
| <ImplicitUsings>disable</ImplicitUsings> | ||
| <UseWindowsForms>true</UseWindowsForms> |
| <RootNamespace>SimWinKeyboard</RootNamespace> | ||
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <Nullable>disable</Nullable> | ||
| <ImplicitUsings>disable</ImplicitUsings> |
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <Nullable>disable</Nullable> | ||
| <ImplicitUsings>disable</ImplicitUsings> | ||
| <UseWindowsForms>true</UseWindowsForms> |
|
Copilot is wrong about some of this. Pulled the forked branch locally and was building and working so I'm going to merge and finesse whichever of the comments actually make sense, tune it up, and prep for new NuGet uploads. Thanks for your contribution! I've also seen that Key2Joy links my project in a nice way, and I really appreciate that! |
|
Thanks for merging and thanks for maintaining this project, much appreciated! |
Hi again, hope you're well.
For our project we're looking to update to .NET 9 (and beyond). Since we rely on SimWinGamePad, it would be super helpful if that supported .NET 8, 9 and 10.
This PR updates to the new SDK-style
.csprojformat and adds multi-targeting across the three library projects (SimWinKeyboard, SimWinMouse, SimWinGamePad), so a single NuGet package covers all of:net48: existing .NET Framework users are unaffected (I tested this)net8.0-windows: .NET 8 LTS [source]net9.0-windows: .NET 9 STS (I tested this)net10.0-windows: .NET 10 LTSThe SimExamples WPF app targets
net9.0-windowsas a single-target executable. (I tested this)What changed:
.csprojfiles converted from legacy MSBuild format to modern SDK-style (much shorter and easier to maintain)System,System.Windows.Forms, etc.) removed. These are automatically included by the SDK.UseWindowsForms=trueset on Mouse and GamePad (which useMouseButtons,MessageBox, etc.)UseWPF=trueset on SimExamples.csfiles. Everything still compiles cleanly across all four targetsAll projects build with
Build succeeded(the only output is a handful ofCA1416platform-guard warnings on Windows-only APIs, which is expected and fine for this Windows-only input simulation library).Let me know if I need to adjust anything.
Thanks for maintaining this library!