dotnet nuget localsdotnet nuget locals
Эта статья относится к следующему: ✔️ пакет SDK для .NET Core 2.x и более поздних версийThis article applies to: ✔️ .NET Core 2.x SDK and later versions
ИмяName
dotnet nuget locals
— очищает или перечисляет локальные ресурсы NuGet.dotnet nuget locals
- Clears or lists local NuGet resources.
Краткий обзорSynopsis
dotnet nuget locals <CACHE_LOCATION> [(-c|--clear)|(-l|--list)] [--force-english-output]
dotnet nuget locals -h|--help
Описание:Description
Команда dotnet nuget locals
очищает или перечисляет локальные ресурсы NuGet в кэше HTTP-запросов, временном кэше или папке пакетов, используемой на уровне компьютера.The dotnet nuget locals
command clears or lists local NuGet resources in the http-request cache, temporary cache, or machine-wide global packages folder.
АргументыArguments
CACHE_LOCATION
Расположение кэша для вывода или очищения.The cache location to list or clear. Принимает одно из следующих значений:It accepts one of the following values:
all
— указывает, что определенная операция применяется ко всем типам кэша, то есть к кэшу HTTP-запросов, глобальному кэшу пакетов и временному кэшу.all
- Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, and the temporary cache.http-cache
— указывает, что определенная операция применяется только к кэшу HTTP-запросов.http-cache
- Indicates that the specified operation is applied only to the http-request cache. Другие расположения кэша не затрагиваются.The other cache locations aren't affected.global-packages
— указывает, что определенная операция применяется только к глобальному кэшу пакетов.global-packages
- Indicates that the specified operation is applied only to the global packages cache. Другие расположения кэша не затрагиваются.The other cache locations aren't affected.temp
— указывает, что определенная операция применяется только к временному кэшу.temp
- Indicates that the specified operation is applied only to the temporary cache. Другие расположения кэша не затрагиваются.The other cache locations aren't affected.
ПараметрыOptions
--force-english-output
Принудительно запускает приложение с использованием инвариантного английского языка и региональных параметров.Forces the application to run using an invariant, English-based culture.
-h|--help
Выводит краткую справку по команде.Prints out a short help for the command.
-c|--clear
Параметр clear очищает кэш указанного типа.The clear option executes a clear operation on the specified cache type. Содержимое каталогов кэша удаляется рекурсивно.The contents of the cache directories are deleted recursively. Пользователь или группа, совершающие выполнение, должны иметь разрешение на доступ к файлам в каталогах кэша.The executing user/group must have permission to the files in the cache directories. Если доступа нет, отображается ошибка, в которой указаны неочищенные файлы и папки.If not, an error is displayed indicating the files/folders that weren't cleared.
-l|--list
Параметр list используется для отображения расположения кэша указанного типа.The list option is used to display the location of the specified cache type.
ПримерыExamples
Отображает пути ко всем локальным каталогам кэша (т. е. к каталогам кэша HTTP-запросов, кэша глобальных пакетов и временного кэша):Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory):
dotnet nuget locals all –l
Отображает путь к локальному каталогу кэша HTTP-запросов.Displays the path for the local http-cache directory:
dotnet nuget locals http-cache --list
Очищает все файлы изо всех локальных каталогов кэша (т. е. каталогов кэша HTTP-запросов, кэша глобальных пакетов и временного кэша):Clears all files from all local cache directories (http-cache directory, global-packages cache directory, and temporary cache directory):
dotnet nuget locals all --clear
Очищает все файлы в локальном каталоге кэша глобальных пакетов:Clears all files in local global-packages cache directory:
dotnet nuget locals global-packages -c
Очищает все файлы в локальном каталоге временного кэша:Clears all files in local temporary cache directory:
dotnet nuget locals temp -c
Устранение неполадокTroubleshooting
Сведения о распространенных проблемах и ошибках при использовании команды dotnet nuget locals
см. в статье об управлении кэшем NuGet.For information on common problems and errors while using the dotnet nuget locals
command, see Managing the NuGet cache.