xrepo 2.0.0-beta05
dotnet tool install --global xrepo --version 2.0.0-beta05
dotnet new tool-manifest
dotnet tool install --local xrepo --version 2.0.0-beta05
#tool dotnet:?package=xrepo&version=2.0.0-beta05&prerelease
nuke :add-package xrepo --version 2.0.0-beta05
XRepo - Cross repository development made easier
XRepo makes it easier to work on shared libraries across repositories by letting you temporarily replace NuGet package references with local project references that your IDE (Rider, Visual Studio) natively understands.
Quickstart
- Install xrepo as a .NET global tool
dotnet tool install -g xrepo
- Bootstrap xrepo by installing MSBuild hooks that will watch for packages that you build locally register them with xrepo:
xrepo bootstrap
- Navigate to the repo where your shared library is built, build it, and register it:
cd ~/src/MySharedLib
dotnet build
xrepo repo register MySharedLib
- In the repo that consumes the shared library, ref it:
cd ~/src/MyApp
xrepo ref MySharedLib
This will find all NuGet packages from MySharedLib that your solution references and add local ProjectReference entries so your IDE can navigate into the source, set breakpoints, and get full IntelliSense.
5) When you're done working on the shared library, unref it:
xrepo unref
Commands
| Command | Description |
|---|---|
bootstrap |
Install global MSBuild hooks for package registration |
repo register <name> [-p\|--path] |
Register a repo at the current or specified path |
repo unregister <name> |
Unregister a repo |
repos |
List all registered repos |
packages |
List all registered packages |
which <name> |
Show the most recently registered location for a package or assembly |
where <name> |
Show all registered locations for a package or assembly |
ref <name> [-s\|--solution] |
Add project references for a repo's packages into a solution |
unref [name] [-s\|--solution] |
Remove project references that were added by xrepo ref |
Tab Completion
XRepo supports shell tab completion via dotnet-suggest. This gives you completions for commands, options, and dynamic values like registered repo names and package IDs.
- Install
dotnet-suggestas a global tool:
dotnet tool install -g dotnet-suggest
- Add the shell shim to your profile:
bash (~/.bashrc):
dotnet-suggest script bash >> ~/.bashrc
zsh (~/.zshrc):
The default script from dotnet-suggest script zsh has bugs that break file path
completion and can produce errors on empty results. Use the fixed version included
in this repo instead:
curl -fsSL https://raw.githubusercontent.com/andyalm/xrepo/main/.tab_completions/zsh.sh >> ~/.zshrc
Or, if you have a local clone of this repo:
cat /path/to/xrepo/.tab_completions/zsh.sh >> ~/.zshrc
PowerShell ($PROFILE):
dotnet-suggest script powershell >> $PROFILE
- Restart your shell, and tab completion will work for xrepo commands:
xrepo <TAB> # lists all commands
xrepo ref <TAB> # lists registered repos, packages, or paths to csproj files
xrepo which <TAB> # lists registered projects for a package
xrepo repo unregister <TAB> # lists registered repos
How it works
XRepo has two phases:
Discovery: XRepo installs MSBuild build hooks that automatically register where your packages are built. When you run dotnet build or dotnet pack in a project, XRepo records the package ID, version, and project path.
Referencing: When you run xrepo ref <RepoName>, XRepo looks up the repo's path, finds all registered packages built from that repo, and checks which projects in your solution reference those packages. For each match, it adds a ProjectReference to the consuming project and adds the source project to your solution file under an "xrepo" folder. Running xrepo unref reverses the process.
| 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-beta05 | 95 | 2/23/2026 |
| 2.0.0-beta04 | 67 | 2/23/2026 |
| 2.0.0-beta03 | 65 | 2/22/2026 |
| 2.0.0-beta02 | 65 | 2/22/2026 |
| 2.0.0-beta01 | 69 | 2/22/2026 |
## What's Changed
* Update where command to output project paths instead of package paths by @andyalm in https://github.com/andyalm/xrepo/pull/16
**Full Changelog**: https://github.com/andyalm/xrepo/compare/v2.0.0-beta04...v2.0.0-beta05