2016-08-04 6 views

ответ

0

Вы можете использовать переменную env NUGET_PACKAGES для этого, или вы можете указать --packages в момент запуска dotnet restore. Переменная env недокументирована, поэтому в будущем могут быть изменения. Вот ссылка на соответствующий код в случае, если происходит: https://github.com/dotnet/cli/blob/rel/1.0.0/build_projects/shared-build-targets-utils/Utils/Dirs.cs#L43

Выход dotnet restore --help даст вам более подробную информацию:

Arguments: 
    [root] List of projects and project folders to restore. Each value can be: a path to a project.json or global.json file, or a folder to recursively search for project.json files. 

Options: 
    -h|--help      Show help information 
    --force-english-output   Forces the application to run using an invariant, English-based culture. 
    -s|--source <source>   Specifies a NuGet package source to use during the restore. 
    --packages <packagesDirectory> Directory to install packages in. 
    --disable-parallel    Disables restoring multiple projects in parallel. 
    -f|--fallbacksource <FEED>  A list of packages sources to use as a fallback. 
    --configfile <file>    The NuGet configuration file to use. 
    --no-cache      Do not cache packages and http requests. 
    --infer-runtimes    Temporary option to allow NuGet to infer RIDs for legacy repositories 
    -v|--verbosity <verbosity>  The verbosity of logging to use. Allowed values: Debug, Verbose, Information, Minimal, Warning, Error. 
    --ignore-failed-sources   Only warning failed sources if there are packages meeting version requirement 

Я также рекомендовал бы читать на этот вопрос, если вы пытаетесь идти оффлайн разработка: How do you set up for offline development with .net Core