【问题标题】:Unhandled exception: System.IO.IOException: The process cannot access the file 'xxx.nupkg' because it is being used by another process未处理的异常:System.IO.IOException:进程无法访问文件“xxx.nupkg”,因为它正被另一个进程使用
【发布时间】:2015-08-31 15:44:19
【问题描述】:

我正在尝试将 squirrel 用于 Windows (版本 1.0.0.0),但无法摆脱该错误。

我已尽一切努力确保该文件确实未被使用。

以下步骤在我的 PC 上重现该错误。

  1. 创建nuget包到releasify
  2. 重启电脑
  3. 仅打开命令提示符(没有其他应用程序正在运行,甚至没有 Visual Studio)
  4. 运行命令squirrel --releasify Digger.1.0.0.1.nupkg

奇怪的是,我可以在收到releasify 命令的错误后立即删除文件:

以下是日志。

2015-08-30 17:28:03> Program: Starting Squirrel Updater: --releasify Digger.1.0.0.1.nupkg
2015-08-30 17:28:03> Program: Bootstrapper EXE found at:C:\dev\utils\squirrel\Setup.exe
2015-08-30 17:28:03> Program: Creating release package: C:\dev\projects\ThirdParty\inmediati\Digger\Digger.Cliente.WPF\Releases\Digger.1.0.0.1.nupkg
2015-08-30 17:28:03> ReleasePackage: Creating release package: C:\dev\projects\ThirdParty\inmediati\Digger\Digger.Cliente.WPF\Releases\Digger.1.0.0.1.nupkg => C:\dev\projects\ThirdParty\inmediati\Digger\Digger.Cliente.WPF\Releases\Digger-1.0.0.1-full.nupkg
2015-08-30 17:28:03> ReleasePackage: Extracting dependent packages: []
2015-08-30 17:28:03> ReleasePackage: Removing unnecessary data
2015-08-30 17:28:03> ReleasePackage: No release notes found in C:\Users\Juan\AppData\Local\SquirrelTemp\tempa\Digger.nuspec
2015-08-30 17:28:03> Unhandled exception: System.IO.IOException: The process cannot access the file 'C:\dev\projects\ThirdParty\inmediati\Digger\Digger.Cliente.WPF\Releases\Digger.1.0.0.1.nupkg' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)

顺便说一句:nuget 包是使用 Any CPU 构建创建的。

【问题讨论】:

  • 反恶意软件的标准 bat 信号阻碍。排除并重试。
  • 进程监视器会告诉你谁的脏手指在上面。

标签: c# wpf nuget squirrel.windows


【解决方案1】:

看起来您是 GitHub 上该线程的所有者,但以防万一其他人同时收到错误,该特定版本的 Squirrel 中似乎存在错误,因此它没有关闭它的 zip 文件创建,这是跟踪的错误:https://github.com/Squirrel/Squirrel.Windows/pull/425 看起来不会太长,直到它被修复。

这里也是 GitHub 中另一个线程的链接:https://github.com/Squirrel/Squirrel.Windows/issues/422

【讨论】:

    猜你喜欢
    • 2018-07-01
    • 2017-12-05
    • 1970-01-01
    • 1970-01-01
    • 2023-04-03
    • 2015-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多