Skip to content

feat: run the DevTools inspector from a NuGet package - #649

Merged
StevenTCramer merged 6 commits into
masterfrom
task/118-package-state-devtools-inspector-as-plugin-1-for-t
Oct 16, 2026
Merged

StevenTCramer merged 6 commits into
masterfrom
task/118-package-state-devtools-inspector-as-plugin-1-for-t

Conversation

@StevenTCramer

Copy link
Copy Markdown
Collaborator

Summary

TimeWarp.State.DevTools.App 12.0.0-beta.14 is one framework-dependent package (no runtime identifier, UseAppHost=false). Its tools/ folder is the published inspector. TimeWarp.State.DevTools.Hosting depends on that package at the same version. The package targets stamp timewarpstatedevtoolspath onto the AppHost. AddTimeWarpStateDevTools() starts that dll with the AppHost's .NET host: DOTNET_HOST_PATH when it is set, otherwise the running dotnet muxer, otherwise DOTNET_ROOT/dotnet, otherwise dotnet. The resource is an ExecutableResource named timewarp-state-devtools, the endpoint name is still http, and ExcludeFromManifest keeps it out of publish output. In publish mode, WithTimeWarpStateDevTools returns the inspected resource unchanged: no WaitFor on the inspector and no TIMEWARP_STATE_DEVTOOLS_ENDPOINT. DevToolsProjectLocator and TIMEWARP_STATE_DEVTOOLS_PROJECT are gone. AddTimeWarpStateDevToolsProject(projectPath) is the explicit inner-loop switch. The sample AppHost uses the same public AddTimeWarpStateDevTools() call. The inspector still has its own store. The package build publishes the inspector after that project's build (NoBuild on the publish). Pack omits appsettings.Development.json, tsconfig.json, web.config, and *.xml from tools/ and still ships the pdbs.

Test plan

Smoke: dotnet test tests/timewarp-state-devtools-tests/timewarp-state-devtools-tests.csproj.

Expect: 66 passed. AddTimeWarpStateDevTools_Should.LeaveTheInspectedAppUnwiredWhenPublishing builds with --operation publish and finds no WaitAnnotation on the inspector and no TIMEWARP_STATE_DEVTOOLS_ENDPOINT callback. ResolveTheDotNetHostInOrder covers host path, muxer, DOTNET_ROOT/dotnet, then dotnet. PackagedDevToolsApp_Should.StartFromAnOutOfTreeAppHost packs App and Hosting into a temp feed, builds an Aspire AppHost outside this repo that only package-references Hosting, and starts the packaged dll with the resource's command, the dll directory as the working directory, and only ASPNETCORE_HTTP_PORTS. The nupkg contains tools/wwwroot/_framework/blazor.web.js and a tools/*.pdb, and does not contain appsettings.Development.json, tsconfig.json, web.config, or *.xml under tools/. GET / returns a body containing TimeWarp State DevTools. GET /_framework/blazor.web.js returns 200. The stamped path is tools/TimeWarp.State.DevTools.dll under the restored timewarp.state.devtools.app package, not a csproj in this repo. ganda repo audit exits 0. The kebab-path advisory remains (Blazor *.lib.module.* names, backlog 110, and the NuGet TimeWarp.State.DevTools.App.targets filename).

Kanban task 118
Session: 1230420

StevenTCramer and others added 6 commits October 16, 2026 00:43
An AppHost outside this repo cannot find the inspector by walking to its csproj.
Hosting now starts the published dll from TimeWarp.State.DevTools.App.

Co-Authored-By: Grok <grok@x.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Publish mode was still pointing the inspected app at the excluded inspector.
The launch command now follows the AppHost's .NET host, the inspector is
published after its own build, and the package tools folder omits development
files.

Co-Authored-By: Grok <grok@x.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StevenTCramer
StevenTCramer merged commit 73d6b2e into master Oct 16, 2026
1 check passed
@StevenTCramer
StevenTCramer deleted the task/118-package-state-devtools-inspector-as-plugin-1-for-t branch October 16, 2026 02:19
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