-
Install xrepo via chocolatey
chocolatey install xrepo
-
Navigate to the repo where your shared library is built, build it, and register it. For example:
cd c:\src\frameworks\AspNetMvc build.cmd xrepo repo register AspNetMvc
-
Pin the repo
xrepo pin AspNetMvc
-
Go build a project that references your shared library via an assembly reference. When you build it, all references to assemblies in your pinned repo will be automatically resolved to locally built copies of the assembly. When you are ready for assembly resolution to go back to normal, simply unpin the repo. For example:
xrepo unpin AspNetMvc
Configuration options can be set via the 'xrepo config' command.
Determines whether pinned assemblies will be copied to the HintPath location of the assembly reference they are overriding. If you use an real-time code analysis tool like ReSharper, you will want to enable this option.
Determines whether a build warning will be generated when a project is built referencing a pinned assembly. This can be a useful reminder when you have something pinned.
Determines whether the <SpecificVersion> element will be overridden at build time. The default, true
, will leave the <SpecificVersion> element in your project file(s) as-is.
When set to false
, <SpecificVersion> will be set to False
, which eliminates the build warnings that would normally be seen if the pinned version of an assembly is not aligned
with the currently referenced version.