Skip to content

Document auto-injection behavior and limitations - #19

Closed
miloszkukla wants to merge 7 commits into
faze79:mainfrom
miloszkukla:agent/document-injection-limitations
Closed

miloszkukla wants to merge 7 commits into
faze79:mainfrom
miloszkukla:agent/document-injection-limitations

Conversation

@miloszkukla

@miloszkukla miloszkukla commented Aug 13, 2026

Copy link
Copy Markdown

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

  • document the implemented auto-injection flow and its runtime, architecture, permission, timing, and lifecycle constraints
  • replace the stale injector status that described native injection as a stub/future feature
  • document the self-hosted alternative and available diagnostic logs
  • clarify that the shipped cross-bitness path is a 64-bit server injecting into a 32-bit target

Why

The injector README predates the current CreateRemoteThread/LoadLibraryW implementation, 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
  • documentation-only change; no runtime code changed

@miloszkukla
miloszkukla marked this pull request as ready for review August 14, 2026 05:13
Copilot AI lite review requested due to automatic review settings August 14, 2026 05:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md and src/WpfVisualTreeMcp.Injector/README.md.
  • Add/extend multi-targeting (net472/net48) and strengthen auto-injection packaging validation (server project + workflows).
  • Add a new WpfVisualTreeMcp.Shared.Tests test 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.

Comment on lines 1 to 6
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text.Json;
using System.Threading.Tasks;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in consolidated PR #22 (commit 35c1177): System.Reflection is now conditional on NETFRAMEWORK and the resolver is enabled for both .NET Framework targets.

Comment thread README.md
│ │ └── 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)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already corrected in consolidated PR #22: the root README now describes Injector as .NET 8 only. #22 supersedes this stacked PR.

Comment on lines 59 to 60
```csharp
// In your WPF application's App.xaml.cs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in consolidated PR #22 (commit 35c1177) by fully qualifying System.Diagnostics.Process in the self-hosting snippet.

Comment on lines +27 to +34
- 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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by consolidated PR #22, whose description explicitly presents and explains the complete code, workflow, packaging, documentation, and test scope.

@miloszkukla

Copy link
Copy Markdown
Author

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.

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.

2 participants