Skip to content

Multi-target for .NET Framework 4.8 + .NET 8, 9 and 10#7

Open
luttje wants to merge 2 commits intoDavidRieman:mainfrom
luttje:dotnet-version-upgrade-net9
Open

Multi-target for .NET Framework 4.8 + .NET 8, 9 and 10#7
luttje wants to merge 2 commits intoDavidRieman:mainfrom
luttje:dotnet-version-upgrade-net9

Conversation

@luttje
Copy link
Contributor

@luttje luttje commented Mar 24, 2026

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 .csproj format 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 LTS

The SimExamples WPF app targets net9.0-windows as a single-target executable. (I tested this)

What changed:

  • All .csproj files converted from legacy MSBuild format to modern SDK-style (much shorter and easier to maintain)
  • Framework assembly references (System, System.Windows.Forms, etc.) removed. These are automatically included by the SDK.
  • UseWindowsForms=true set on Mouse and GamePad (which use MouseButtons, MessageBox, etc.)
  • UseWPF=true set on SimExamples
  • No changes to any source .cs files. Everything still compiles cleanly across all four targets

All projects build with Build succeeded (the only output is a handful of CA1416 platform-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!

@luttje luttje mentioned this pull request Mar 24, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant