【问题标题】:How to clear the local nuget package cache using the Cake script如何使用 Cake 脚本清除本地 nuget 包缓存
【发布时间】:2017-03-03 10:42:35
【问题描述】:

我需要清除系统中缓存的 NuGet。

我可以在命令提示符下运行以下命令。

nuget locals -clear all

如何使用 Cake 脚本来做同样的事情。

请提出可能的方法。

【问题讨论】:

    标签: powershell continuous-integration nuget nuget-package cakebuild


    【解决方案1】:

    Cake 中该 nuget 命令还没有任何有用的包装器,但您可以像这样从 Cake 中轻松启动它作为进程

    int nugteClear = StartProcess("nuget", "locals -clear all");
    if (nugteClear != 0)
    {
        throw new Exception("Failed to clear package cache.");
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-05
      • 2022-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多