Add .NET Framework 4.7.2 Inspector support - #20
miloszkukla wants to merge 3 commits into
Conversation
a8885e6 to
77d304d
Compare
There was a problem hiding this comment.
Pull request overview
Adds explicit .NET Framework 4.7.2 support to the Inspector + Shared libraries so older WPF apps can self-host the Inspector via project reference, and introduces a Shared-only test project to validate behavior across net472/net48/net8.0.
Changes:
- Multi-target
WpfVisualTreeMcp.SharedandWpfVisualTreeMcp.Inspectorfornet472alongside existingnet48andnet8.0(-windows)targets, including framework-conditional references/packages. - Add
WpfVisualTreeMcp.Shared.Teststo run Shared regression tests acrossnet472,net48, andnet8.0. - Update docs to describe the Inspector’s supported self-hosting target frameworks; simplify Injector to
net8.0only.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| WpfVisualTreeMcp.sln | Adds the new Shared-only test project to the solution. |
| tests/WpfVisualTreeMcp.Shared.Tests/WpfVisualTreeMcp.Shared.Tests.csproj | New multi-targeted test project validating Shared across net472/net48/net8.0. |
| tests/WpfVisualTreeMcp.Shared.Tests/SharedModelsTests.cs | New Shared model construction/assertion tests. |
| tests/WpfVisualTreeMcp.Shared.Tests/IpcSerializerTests.cs | New IPC envelope regression tests (multi-targeted). |
| src/WpfVisualTreeMcp.Shared/WpfVisualTreeMcp.Shared.csproj | Adds net472 target and applies .NET Framework package refs to both net472 and net48. |
| src/WpfVisualTreeMcp.Inspector/WpfVisualTreeMcp.Inspector.csproj | Adds net472 target and applies explicit WPF refs to both net472 and net48. |
| src/WpfVisualTreeMcp.Injector/WpfVisualTreeMcp.Injector.csproj | Simplifies Injector to target net8.0 only. |
| README.md | Documents Inspector’s multi-target support and updates the repo tree description. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <PropertyGroup> | ||
| <!-- | ||
| Multi-targeted so the x86 InjectorHelper (net8.0) can reference us without | ||
| a cross-TFM warning. .NET Framework 4.8 stays around so the existing server | ||
| build path is unchanged. | ||
| --> | ||
| <TargetFrameworks>net48;net8.0</TargetFrameworks> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <OutputType>Library</OutputType> |
There was a problem hiding this comment.
Assessed in consolidated PR #22 and intentionally unchanged. Injector no longer references the Windows-targeted Inspector assembly; moving Injector to net8.0-windows would also force the referencing Server/tool TFM to change. The Windows runtime requirement is documented explicitly.
|
Superseded by #22, which consolidates the full change set and incorporates the applicable review feedback. Closing this stacked PR to avoid duplicate review threads and workflow ambiguity. |
Important
This is the base of the code stack. Please merge it with a merge commit so #18 and #21 retain the same shared commit IDs and their cumulative diffs shrink without cherry-picking.
Summary
net472to the Shared and Inspector target framework matricesnet8.0; it launches and injects the Inspector but is not referenced by target applicationsnet472andnet48net472,net48, andnet8.0Why
A .NET Framework 4.7.2 WPF project cannot reference the existing
net48Inspector target at compile time. Adding a dedicatednet472target enables self-hosting without retargeting the application.This keeps
net48rather than replacing it, preserving the existing injection payload and making support for .NET Framework 4.7.2, .NET Framework 4.8, and .NET 8 explicit.Validation
dotnet build src/WpfVisualTreeMcp.Inspector/WpfVisualTreeMcp.Inspector.csproj --configuration Release --framework net472— succeeded with 0 errorsdotnet build WpfVisualTreeMcp.sln --configuration Release— succeeded with 0 errors and compiled every declared Shared and Inspector targetWpfVisualTreeMcp.Shared.Tests— 19 passed on each ofnet472,net48, andnet8.0v145override was command-line only and the project remains onv143net48Inspector, dependency closure, and native bootstrapper under bothnative/x64andnative/x86git diff --check