diff --git a/src/Inedo.UPack/Packaging/PackageRegistry.cs b/src/Inedo.UPack/Packaging/PackageRegistry.cs
index 32e313a..756a502 100644
--- a/src/Inedo.UPack/Packaging/PackageRegistry.cs
+++ b/src/Inedo.UPack/Packaging/PackageRegistry.cs
@@ -16,7 +16,25 @@ public sealed class PackageRegistry : IDisposable
{
private bool disposed;
- private PackageRegistry(string registryRoot) => this.RegistryRoot = registryRoot;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The root directory of the registry. This must be an absolute path.
+ /// is null or empty.
+ /// is not an absolute path.
+ ///
+ /// To initialize a instance with one of the standard registry locations, use the
+ /// static method.
+ ///
+ public PackageRegistry(string registryRoot)
+ {
+ if (string.IsNullOrWhiteSpace(registryRoot))
+ throw new ArgumentNullException(nameof(registryRoot));
+ if (!Path.IsPathRooted(registryRoot))
+ throw new ArgumentException("Registry root must be an absolute path.");
+
+ this.RegistryRoot = registryRoot;
+ }
///
/// Gets the root directory of the package registry.