我正在尝试将 squirrel 用于 Windows (版本 1.0.0.0),但无法摆脱该错误。
我已尽一切努力确保该文件确实未被使用。
以下步骤在我的 PC 上重现该错误。
- 创建 nuget 包以
releasify
- 重启电脑
- 仅打开命令提示符(没有其他应用程序正在运行,甚至没有 Visual Studio)
- 运行命令
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
构建创建的。