-
Notifications
You must be signed in to change notification settings - Fork 0
Package repositories
OpenWrap uses repositories to store and resolve packages needed for resolving dependencies. Several types of package repositories.
Local repositories are used to resolve packages at build and runtime. You can add to a repository using the add-wrap
command, and remove unused packages with the clean-wrap
command.
For any code or application, especially Visual Studio solutions, packages should be stored locally, alongside the solution, and checked-in together with the source code in a VCS. This is the best way to ensure that any developer starting work on a project will automatically get the same version of packages as the developer that wrote the code.
In any such project, the project repository can be anywhere in the folder hierarchy above the current directory, in the same folder as your Package descriptor, and named wraps.
When using the command-line, the same applies, but from the current directory you're in.
By default, adding packages also adds them to the system repository. The system repository is where packages come from when using commands from any part of the system where the project repository is not available.
The system repository is per user, and located at %LOCALAPPDATA%\openwrap\wraps
.
Remote repositories are used to distribute packages. OpenWrap comes with support for many types of remote repositories.
Remote repositories can be managed with the add-remote
, remove-remote
and list-remote
commands. Commands that accept a remote repository (such as list-wrap
or publish-wrap
) can accept the name of a configured repository, or the URI of the repository itself.
File-system repositories are either remote repositories on a local hard drive or on a UNC share.
To add a local repository, you can use the file:///
URI scheme, followed by the local path to a folder that will serve as a repository. To add a repository to c:\packages
, the package URI would be file:///c:/packages
.
File shares can also be used using the same syntax. To use a network share named packages
on a server called packageserver
, the URI will be file://packageserver/packages
.
In both cases, the only needed command to add such repositories is add-remote remoteName file://server/path
.
Http repositories use the same format internally as the file-system repositories, but over HTTP. The specification to implement a compatible http repository can be read at OpenWrap publishing protocol.
To add an http repository, the URI is as simple as http://servername
.
The default openwrap server is at http://wraps.openwrap.org
and is added by default when you use OpenWrap.
NuGet repositories are also supported, using the nuget://
URI scheme. For more information, see the Nuget support page.