Skip to content

Commit 6033a18

Browse files
committed
docs: document building the .NET tool package
Add a .NET tool section to the development guide: how to build the package with build/dntool/build.sh (it is script-built rather than via dotnet build, being platform-agnostic) and how to install the result into an isolated tool path to try it. Assisted-by: Claude Opus 4.8 Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 52939e6 commit 6033a18

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/development.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,31 @@ written to `out/package/debug` (`out/package/release` for a Release build).
108108
The flat binaries can also be found in
109109
`out/publish/git-credential-manager/debug_linux-x64`.
110110

111+
### .NET tool
112+
113+
The .NET tool NuGet package is platform-agnostic. Build it the way CI does,
114+
through the distribution project, which publishes the product as portable IL and
115+
packs it, stamping the version from the `VERSION` file:
116+
117+
```shell
118+
dotnet build build/dntool --configuration=Debug
119+
```
120+
121+
The package metadata and file layout live in
122+
`build/dntool/Dntool.Distribution.csproj`; packing is just `dotnet pack` over
123+
that project, so no `nuget.exe` and no hand-authored `.nuspec` are needed. The
124+
`.nupkg` is written to `out/package/debug` (`out/package/release` for a Release
125+
build).
126+
127+
To try the freshly built tool without affecting your global tools, install it
128+
into an isolated tool path:
129+
130+
```shell
131+
dotnet tool install --tool-path /tmp/gcm-tool \
132+
--add-source out/package/debug git-credential-manager
133+
/tmp/gcm-tool/git-credential-manager --version
134+
```
135+
111136
## Debugging
112137

113138
To debug from inside an IDE you'll want to set `git-credential-manager` as the

0 commit comments

Comments
 (0)