【问题标题】:Build project - Nuget Error构建项目 - Nuget 错误
【发布时间】:2013-08-13 12:27:01
【问题描述】:

错误只发生在一台机器上。

尝试

错误的路径

我认为任何来源的路径都可能是错误的,所以我打开NuGet.Config检查,3条路径都正确!

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageRestore>
    <add key="enabled" value="True" />
  </packageRestore>
  <packageSources>
    <add key="NuGet official package source" value="https://nuget.org/api/v2/" />
    <add key="Nightly ASP.NET Web Stack" value="http://www.myget.org/F/aspnetwebstacknightly/" />
    <add key="Bind Solution" value="W:\Cloud\Dropbox\Bind Defaults\Nuget Repository" />
  </packageSources>
  <disabledPackageSources />
  <activePackageSource>
    <add key="NuGet official package source" value="https://nuget.org/api/v2/" />
  </activePackageSource>
</configuration>

Nuget.exe 不存在

检查.nuget 文件夹,.exe 在目录中! 签入路径的窗口,有!

我尝试手动运行命令,运行成功!

nuget install packages.config -source "" -NonInteractive -RequireConsent -solutionDir "W:\C lients\creditoimobiliariobb\sistema\src\CreditoImobiliarioBB\ "

完全错误:

错误 1 ​​系统找不到指定的路径。 CreditoImobiliarioBB.Domain

错误 2 命令 ""W:\Clients\creditoimobiliariobb\sistema\src\CreditoImobiliarioBB.nuget\NuGet.exe" install "W:\Clients\creditoimobiliariobb\sistema\src\CreditoImobiliarioBB\CreditoImobiliarioBB.Model\packages.config " -source "" -NonInteractive -RequireConsent -solutionDir "W:\Clients\creditoimobiliariobb\sistema\src\CreditoImobiliarioBB\ " " 以代码 -1 退出。 CreditoImobiliarioBB.Domain

注意事项

只有具有本地包的项目(来源为key="Bind Solution" value="W:\Cloud\Dropbox\Bind Defaults\Nuget Repository")才会遇到麻烦。最近,包的位置移动到了另一个目录(在本例中为W:\Cloud\Dropbox\Bind Defaults\Nuget Repository)。

【问题讨论】:

  • 可能没有,但你注意到空间了吗? -> "W:\C lients\cr"

标签: nuget nuget-package


【解决方案1】:

我最近遇到了类似的问题,我通过这样做解决了它:

  1. 将 Visual Studio 更新到最新版本。 (扩展和更新 - 产品更新)
  2. 将 Nugget 更新到最新版本。 (扩展和更新 - Visual Studio 库)
  3. 清除包缓存。 (选项 - 包管理器)
  4. 重建解决方案。

希望对你有帮助。

【讨论】:

    【解决方案2】:

    我在使用 NuGet.exe 和 WG.exe for WebGrease 时遇到了类似的问题。我意识到打开病毒防护后,.exe 文件无法正常关闭。禁用病毒防护后,我就能获得所需的一切(公司正在使用 McAfee)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-09
      • 1970-01-01
      • 2013-11-24
      • 1970-01-01
      • 1970-01-01
      • 2020-04-28
      相关资源
      最近更新 更多