Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.23k stars 1.02k forks source link

System.IO.IOException , when the output directory has the original nuget package . #1810

Open UnnecessaryPunctuation opened 2 years ago

UnnecessaryPunctuation commented 2 years ago

Squirrel version(s) Using Squirrel 2.0.1 : \packages\squirrel.windows.2.0.1\tools.

Description When using a power shell script to call nuget and squirrel. If Nuget output and Squirrel are in the same directory. Squirrel will throw Unhandled exception: System.IO.IOException: The process cannot access the file 'xxx.nupkg' because it is being used by another process

[07/06/22 14:58:22] fatal: Finished with unhandled exception: System.IO.IOException: Le processus ne peut pas accéder au fichier 'XYZ\bin\Debug\DevDebug.1.0.1.nupkg', car il est en cours d'utilisation par un autre processus.
à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
à System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
à Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, Boolean packageAs64Bit, String frameworkVersion, Boolean generateDeltas)
à Squirrel.Update.Program.executeCommandLine(String[] args)
à Squirrel.Update.Program.main(String[] args)

But no issue if I change one of the directory.