Document auto-injection behavior and limitations - #19
miloszkukla wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s auto-injection documentation (root README + injector README) to reflect the current CreateRemoteThread/LoadLibraryW + native bootstrapper implementation and to clearly state runtime/architecture constraints, while also carrying stacked changes that expand .NET Framework target support and harden packaging/CI validation for auto-injection payloads.
Changes:
- Document the implemented auto-injection flow, constraints, diagnostics, and self-hosted alternative in
README.mdandsrc/WpfVisualTreeMcp.Injector/README.md. - Add/extend multi-targeting (
net472/net48) and strengthen auto-injection packaging validation (server project + workflows). - Add a new
WpfVisualTreeMcp.Shared.Teststest project and include it in the solution.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| WpfVisualTreeMcp.sln | Adds the new Shared test project to the solution. |
| tests/WpfVisualTreeMcp.Shared.Tests/WpfVisualTreeMcp.Shared.Tests.csproj | Introduces a multi-targeted Shared test project configuration. |
| tests/WpfVisualTreeMcp.Shared.Tests/SharedModelsTests.cs | Adds basic construction/assertion coverage for shared model types. |
| tests/WpfVisualTreeMcp.Shared.Tests/IpcSerializerTests.cs | Adds regression coverage around IPC envelope serialization/deserialization. |
| src/WpfVisualTreeMcp.Shared/WpfVisualTreeMcp.Shared.csproj | Extends Shared library TFMs to include net472 and updates JSON package conditions. |
| src/WpfVisualTreeMcp.Server/WpfVisualTreeMcp.Server.csproj | Expands injected payload inclusion and adds publish/pack payload validation. |
| src/WpfVisualTreeMcp.Inspector/WpfVisualTreeMcp.Inspector.csproj | Extends Inspector TFMs to include net472 and updates framework-specific references. |
| src/WpfVisualTreeMcp.Inspector/InspectorService.cs | Adds .NET Framework dependency resolution helper for co-located private assemblies. |
| src/WpfVisualTreeMcp.Injector/WpfVisualTreeMcp.Injector.csproj | Simplifies Injector to net8.0 and keeps Inspector project reference. |
| src/WpfVisualTreeMcp.Injector/README.md | Replaces stale injector status text with current implementation details/limitations. |
| README.md | Documents auto-injection mode and updates project structure/architecture notes. |
| CHANGELOG.md | Adds an Unreleased section describing recent packaging/runtimeconfig fixes. |
| .github/workflows/release.yml | Builds native bootstrappers and verifies publish/NuGet payload completeness. |
| .github/workflows/build.yml | Builds native bootstrappers and verifies publish/NuGet payload completeness in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Reflection; | ||
| using System.Text.Json; | ||
| using System.Threading.Tasks; |
| │ │ └── Services/ # Process & IPC management | ||
| │ ├── WpfVisualTreeMcp.Inspector/ # Injected DLL (.NET Framework 4.8) | ||
| │ ├── WpfVisualTreeMcp.Inspector/ # Injected DLL (.NET Framework 4.7.2/4.8 and .NET 8) | ||
| │ ├── WpfVisualTreeMcp.Injector/ # Managed injection logic (CreateRemoteThread; net48 + net8.0) |
| ```csharp | ||
| // In your WPF application's App.xaml.cs |
| - name: Setup MSBuild | ||
| uses: microsoft/setup-msbuild@v1.3 | ||
|
|
||
| - name: Build native bootstrapper | ||
| run: | | ||
| msbuild src/WpfVisualTreeMcp.Bootstrapper/WpfVisualTreeMcp.Bootstrapper.vcxproj /m /p:Configuration=Release /p:Platform=x64 | ||
| msbuild src/WpfVisualTreeMcp.Bootstrapper/WpfVisualTreeMcp.Bootstrapper.vcxproj /m /p:Configuration=Release /p:Platform=Win32 | ||
|
|
There was a problem hiding this comment.
Superseded by consolidated PR #22, whose description explicitly presents and explains the complete code, workflow, packaging, documentation, and test scope.
|
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 PR is stacked after #18 and before #21. Merge #20, #18, #19, and #21 in that order using merge commits; the cumulative shared commits keep identical IDs and disappear as the lower PRs merge.
Summary
Why
The injector README predates the current
CreateRemoteThread/LoadLibraryWimplementation, native CLR bootstrapper, and x86 helper. The root README advertises auto-injection but does not explain when it can fail or when self-hosting is more appropriate.Impact
Users can distinguish packaging problems from inherent injection constraints and choose auto-injection or self-hosting based on concrete requirements.
Validation
git diff --check