question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TeamCity build step fails during Squirrel releasify while creating delta package

See original GitHub issue

I have a .NET 5.0 project which uses the Clowd.Squirrel package (2.7.79-pre at the time of writing).

I use a powershell command to releasify my NuGet package of the project. It works perfectly when used directly from a powershell window (paths and names are simplified here, but otherwise the same command): & "C:\Program Files\Clowd.Squirrel\Squirrel.exe" releasify --releaseDir "C:\My Releases" --package "C:\My NuGet Packages\My_App.0.1.2.nupkg" --framework "net5" --splashImage "C:\My Resources\splash.png" --icon "C:\My Resources\logo.ico" --appIcon "C:\My Resources\logo.ico"

This creates all the necessary files, the setup works and the application updates correctly.

I use a TeamCity build pipeline to automate my release process. Using the previous command in a powershell build step yields the following messages:

Step 7/7: Clowd Squirrel Releasify (PowerShell) (6s)
[11:13:11][Step 7/7] PowerShell Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:13:11][Step 7/7] Working directory: C:\TeamCity\buildAgent\work\d720619d382a4b8a
[11:13:11][Step 7/7] Command: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:13:11][Step 7/7] PowerShell arguments: -NoProfile, -NonInteractive, -ExecutionPolicy, ByPass, -File, C:\TeamCity\buildAgent\temp\buildTmp\powershell8389058061481115215.ps1
[11:13:12][Step 7/7] [INFO] SingleFileBundle: Extracting Update.exe resources to temp directory
[11:13:12][Step 7/7] [INFO] SingleFileBundle: Patching Update.exe icon
[11:13:13][Step 7/7]
[11:13:13][Step 7/7] [INFO] SingleFileBundle: Re-packing Update.exe bundle
[11:13:14][Step 7/7] [INFO] Program: Creating release package: C:\My Releases\My_App.0.1.2.nupkg
[11:13:14][Step 7/7] [INFO] ReleasePackage: Creating release package: C:\My Releases\My_App.0.1.2.nupkg => C:\My Releases\My_App-0.1.2-full.nupkg
[11:13:14][Step 7/7] [INFO] ReleasePackage: Removing unnecessary data
[11:13:15][Step 7/7] [INFO] Program: Creating stub executables
[11:13:15][Step 7/7] [INFO] Program: Using app icon from command line arguments
[11:13:15][Step 7/7] [INFO] EasyZip: Compressing 'C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelClowdTemp\tempb' to 'C:\My Releases\My_App-0.1.2-full.nupkg'...
[11:13:17][Step 7/7] [INFO] DeltaPackageBuilder: Extracting C:\My Releases\My_App-0.1.1-full.nupkg and C:\My Releases\My_App-0.1.2-full.nupkg into C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelClowdTemp\tempc
[11:13:17][Step 7/7] [INFO] EasyZip: Extracting 'C:\My Releases\My_App-0.1.1-full.nupkg' to 'C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelClowdTemp\tempb'...
[11:13:17][Step 7/7] [INFO] EasyZip: Extracting 'C:\My Releases\My_App-0.1.2-full.nupkg' to 'C:\Windows\system32\config\systemprofile\AppData\Local\SquirrelClowdTemp\tempc'...
[11:13:17][Step 7/7] 
[11:13:17][Step 7/7] [ERRO] System.InvalidOperationException: Sequence contains no matching element
[11:13:17][Step 7/7]    at System.Linq.ThrowHelper.ThrowNoMatchException()
[11:13:17][Step 7/7]    at Squirrel.DeltaPackageBuilder.CreateDeltaPackage(ReleasePackage basePackage, ReleasePackage newPackage, String outputFile) in ./Internal/DeltaPackage.cs:line 40
[11:13:17][Step 7/7]    at SquirrelCli.Program.Releasify(ReleasifyOptions options) in ./Program.cs:line 258
[11:13:17][Step 7/7]    at SquirrelCli.CommandAction`1.Execute(IEnumerable`1 args) in ./ValidatedOptionSet.cs:line 160
[11:13:17][Step 7/7]    at SquirrelCli.CommandSet.Execute(String[] args) in ./ValidatedOptionSet.cs:line 194
[11:13:17][Step 7/7]    at SquirrelCli.Program.Main(String[] args) in ./Program.cs:line 77

I have tried:

  • Placing the command into a .ps1 file to run it in the build step (instead of pasting the command into TeamCity)
  • Running Command Line to execute the same .ps1 file Both cases produced the same error.

Workaround: Adding the –noDelta flag skips the delta package building, where the build step otherwise fails. This works both “by hand” and “through TeamCity”. On the flip side, updating the application will always download the full package (since there or no deltas).

Personal findings: It seems that the DeltaPackageBuilder fails because the packages have wrong version numbers (based on source code). This was also evident when I checked the SquirrelClowdTemp temporary folders. One of the .nuspec files contained an earlier version number, while the newest one was nowhere to be found.

I don’t entirely understand the releasify process and I currently don’t have the time to dive into it so that’s why I opened this issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
caesaycommented, Jan 26, 2022

Scratch that, I will not be adding an additional cli parameter, but you can override the squirrel temporary directory already by creating the following environment variable: CLOWD_SQUIRREL_TEMP and setting it to a folder without filesystem virtualisation. (eg. not in the system32 folder)

0reactions
TPeterdicommented, Jan 26, 2022

Scratch that, I will not be adding an additional cli parameter, but you can override the squirrel temporary directory already by creating the following environment variable: CLOWD_SQUIRREL_TEMP and setting it to a folder without filesystem virtualisation. (eg. not in the system32 folder)

I can confirm that this indeed solved my issue. Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Only dot "nupkg" file #1569 - Squirrel/Squirrel.Windows
Suddenly, it stopped export of "full" and "delta" packages, ... I didn't change the code, neither the build steps in TeamCity. Any ideas?...
Read more >
Build Failure Conditions - TeamCity On-Premises
Another build failure condition causes TeamCity to mark build as failed when a certain text is present in the build log. To add...
Read more >
When a Build Step fails in a team city build can I stop future ...
I am using TeamCity as my CI server. I have defined three Build Steps. One builds my project from the .sln file, one...
Read more >
TeamCity Build Silent Failure
I am getting an error in my TeamCity build, but the build runner is not reporting it.
Read more >
Build failure using Team City
I'm using DLM Automation (the latest update!) and Team City to build a database, source controlled in TFS. The database is source controlled ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found