Squirrel / OldSquirrelForWindows

It's like ClickOnce but Works™
665 stars 55 forks source link

Shimmer selects wrong packages from the packages folder #76

Closed flagbug closed 11 years ago

flagbug commented 11 years ago

Say you have FooLibrary.1.0.0 and FooLibrary.1.0.1 laying in your packages folder (This happens if you have different branches with different versions of the package and package restore enabled).

When creating a new release, the package contains version 1.0.0 of the library, even though package version 1.0.1 is referenced in the application.

shiftkey commented 11 years ago

Which version of Shimmer are you using?

flagbug commented 11 years ago

Oops, sorry, 0.6.8

shiftkey commented 11 years ago

@flagbug can you re-test this in 0.6.10 - I saw that issue a while ago but I've been able to create clean packages despite having ~6 releases in my build output...

flagbug commented 11 years ago

I would, but with 0.6.10, I'm getting the following error when doing a New-Release

CreateReleasePackage.exe : 
At C:\Users\Dennis\Dropbox\Projects\Espera\Espera\packages\Shimmer.0.6.10-beta\tools\commands.psm1:63 char:26
+         $releaseOutput = & $createReleasePackageExe -o $releaseDir -p $packageDi ...
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Unhandled Exception:

System.InvalidOperationException: Source sequence doesn't contain any elements.
   at System.Linq.EnumerableExtensions.ExtremaBy[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, Func`3 compare)
   at CreateReleasePackage.Program.Main(String[] args)
shiftkey commented 11 years ago

That's fascinating - I haven't seen that one yet.

What does your RELEASES file contain - and what's the name of the nupkg that's being passed into the installer step?

P.S:

If you want to step into that code clone down the Shimmer repo and run this command:

.\Create-Release.ps1 -config Debug

And install those packages into the solution.

I think it's related to this method and the .MaxBy method but I can only speculate without having some more data.

flagbug commented 11 years ago

@shiftkey Oh, and I think we're both talking about different things. I'm talking about the directory where NuGet stores the packages for the project, the \packages folder.

Notice how the Caliburn.Micro package is present both as version 1.4.1 and 1.5.1. Version 1.4.1 is an artifact of another branch I'm working on, but version 1.5.1 is referenced in the project where I create the release with New-Release

Now the problem is, that in the package created by Shimmer, the .dll from the 1.4.1 package is included.

flagbug commented 11 years ago

@shiftkey The error with New-Release seems to appear when doing two subsequent New-Release without changing the version number in between. (I expected it to overwrite the newest release if the version numbers don't change)

shiftkey commented 11 years ago

Notice how the Caliburn.Micro package is present both as version 1.4.1 and 1.5.1. Version 1.4.1 is an artifact of another branch I'm working on, but version 1.5.1 is referenced in the project where I create the release with New-Release

Now the problem is, that in the package created by Shimmer, the .dll from the 1.4.1 package is included.

A-ha! Right, now I'm with you.

shiftkey commented 11 years ago

So what does the .nuspec file for your project look like?

EDIT: no, the packages.config file. Oops.

flagbug commented 11 years ago

@shiftkey

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="akavache" version="3.0.2" targetFramework="net45" />
  <package id="akavache.portable" version="3.0.2" targetFramework="net45" />
  <package id="Caliburn.Micro" version="1.5.1" targetFramework="net45" />
  <package id="MahApps.Metro" version="0.11.0.59-ALPHA" targetFramework="net45" />
  <package id="MarkdownSharp" version="1.13.0.0" targetFramework="net45" />
  <package id="Microsoft.Bcl" version="1.0.19" targetFramework="net45" />
  <package id="Microsoft.Bcl.Async" version="1.0.16" targetFramework="net45" />
  <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" />
  <package id="Microsoft.Web.Xdt" version="1.0.0" targetFramework="net45" />
  <package id="Microsoft.Windows.Shell" version="3.0.1.0" targetFramework="net45" />
  <package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
  <package id="Ninject" version="3.0.1.10" targetFramework="net45" />
  <package id="NuGet.Core" version="2.7.0" targetFramework="net45" />
  <package id="Ookii.Dialogs" version="1.0" targetFramework="net45" />
  <package id="Rareform" version="1.5.2" targetFramework="net40" />
  <package id="ReactiveMarrow" version="0.3.1-alpha" targetFramework="net45" />
  <package id="reactiveui-core" version="5.1.2" targetFramework="net45" />
  <package id="reactiveui-platforms" version="5.1.2" targetFramework="net45" />
  <package id="reactiveui-xaml" version="5.1.2" targetFramework="net45" />
  <package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
  <package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
  <package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
  <package id="Rx-Main" version="2.1.30214.0" targetFramework="net45" />
  <package id="Rx-PlatformServices" version="2.1.30214.0" targetFramework="net45" />
  <package id="Rx-XAML" version="2.1.30214.0" targetFramework="net45" />
  <package id="Shimmer" version="0.6.10-beta" targetFramework="net45" />
  <package id="Shimmer.Client" version="0.6.10-beta" targetFramework="net45" />
  <package id="Shimmer.Core" version="0.6.10-beta" targetFramework="net45" />
  <package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net45" />
  <package id="System.IO.Abstractions.TestingHelpers" version="1.4.0.66" targetFramework="net45" />
  <package id="Windows7APICodePack-Core" version="1.1.0.0" targetFramework="net45" />
  <package id="Windows7APICodePack-Shell" version="1.1.0.0" targetFramework="net45" />
  <package id="YoutubeExtractor" version="0.6.2" targetFramework="net45" />
</packages>
shiftkey commented 11 years ago

Great. I'll see if I can write a test to isolate this issue.