Umbraco.Community.WorktreeDevPort
0.1.2
See the version list below for details.
dotnet add package Umbraco.Community.WorktreeDevPort --version 0.1.2
NuGet\Install-Package Umbraco.Community.WorktreeDevPort -Version 0.1.2
<PackageReference Include="Umbraco.Community.WorktreeDevPort" Version="0.1.2" />
<PackageVersion Include="Umbraco.Community.WorktreeDevPort" Version="0.1.2" />
<PackageReference Include="Umbraco.Community.WorktreeDevPort" />
paket add Umbraco.Community.WorktreeDevPort --version 0.1.2
#r "nuget: Umbraco.Community.WorktreeDevPort, 0.1.2"
#:package Umbraco.Community.WorktreeDevPort@0.1.2
#addin nuget:?package=Umbraco.Community.WorktreeDevPort&version=0.1.2
#tool nuget:?package=Umbraco.Community.WorktreeDevPort&version=0.1.2
Umbraco.Community.WorktreeDevPort
Gives every git worktree of an Umbraco site its own stable local dev port, discoverable by any tool with a plain git config call — no named pipe, no Unix socket, no /site-address endpoint to query.
Install
dotnet add package Umbraco.Community.WorktreeDevPort
That's it — the composer is picked up automatically by Umbraco and only activates when ASPNETCORE_ENVIRONMENT=Development.
How it works
- The first time the site starts in a given worktree, it picks a free port in
44300–44399and saves it withgit config --worktree worktreedevport.port <port>. - That value lives in the worktree's own git config (
.git/config.worktreeor.git/worktrees/<name>/config.worktree) — never in a tracked file, never in/tmp. - Every later run in that same worktree reuses the same port.
- Removing the worktree (
git worktree remove) deletes the saved port with it. Nothing to clean up by hand. - Any other tool — a client generator script, an AI agent, a teammate — gets the same port by running
git config --worktree --get worktreedevport.port. No need to ask the running site what port it's on.
See worktree-dev-port for the matching Node.js helper.
Configuration
Optional, in appsettings.Development.json:
{
"WorktreeDevPort": {
"BasePort": 44300,
"RangeSize": 100
}
}
If ASPNETCORE_URLS (or urls) is already set, this package leaves it alone.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Umbraco.Cms.Web.Common (>= 17.0.0 && < 19.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.