zoukankan      html  css  js  c++  java
  • Forcing restore from package sources

    https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore#forcing-restore-from-package-sources

    By default, NuGet restore operations use packages from the global-packages and http-cache folders, which are described on Managing the global packages and cache folders.

    To avoid using the global-packages folder, do one of the following:

    • Clear the folder using nuget locals global-packages -clear or dotnet nuget locals global-packages --clear
    • Temporarily change the location of the global-packages folder before the restore operation using one of the following methods:
      • Set the NUGET_PACKAGES environment variable to a different folder.
      • Create a NuGet.Config file that sets globalPackagesFolder (if using PackageReference) or repositoryPath (if using packages.config) to a different folder (see configuration settings
      • MSBuild only: specify a different folder with the RestorePackagesPath property.

    To avoid using the cache for HTTP sources, do one of the following:

    • Use the -NoCache option with nuget restore or the --no-cache option with dotnet restore. These options do not affect restore operations through the Visual Studio Package Manager UI or Console.
    • Clear the cache using nuget locals http-cache -clear or dotnet nuget locals http-cache --clear.
    • Temporarily set of the NUGET_HTTP_CACHE_PATH environment variable to a different folder.

    执行这2个命令

    nuget locals global-packages -clear

    Use the -NoCache option with nuget restore

    Example

    nuget sources add -Name "rdc" -Source http://172.31.212.138:8089/Nuget
    nuget locals global-packages -clear
    nuget restore LISA.CMSWeb.sln -NoCache
    pause

  • 相关阅读:
    SDN作业(4)
    SDN作业(3)
    第一次个人编程作业
    SDN作业(2)
    SDN作业(1)
    第一次博客作业
    浅谈闭包
    预编译And作用域链
    定时器
    window事件
  • 原文地址:https://www.cnblogs.com/chucklu/p/10394141.html
Copyright © 2011-2022 走看看