This project is read-only.


NuGet package references old Iesi.Collections


YUI Compressor nuget package has dependency "Iesi.Collection=" meaning that the project using latest NHibernate can not update to the latest Iesi.Collection if it has YUI Compressor installed.

I believe nuget package dependency specification should be changed to "Iesi.Collection≥"
Closed Sep 13, 2013 at 11:30 AM by freeranger


purekrome wrote Jun 20, 2013 at 1:33 AM

Hi @FuriCuri :)

Ah! well done! i'll push up a new package today with a minor version bump, with the new dependency spec.

watch this space!

purekrome wrote Jun 23, 2013 at 1:36 AM

I just had a quick read of the Iesi.Collections release notes.

they say that version 4+ are dependant upon .NET 4.0

YUICompressor is .NET 2.0 only.

Looking at the Iesi release history, i can say use any version of Iesi where version < 4.

Would that for for you, @FuriCuri?

Or does the latest version of NHib require Iesi 4+ ?

FuriCuri wrote Jun 23, 2013 at 3:18 PM

For now - no, NHibernate does not use .net 4 yet. But they do have plans for it.

purekrome wrote Jul 9, 2013 at 3:20 PM

new build now up. Tell me if that's better.

FuriCuri wrote Jul 16, 2013 at 10:38 AM

I've got errors like this now:

Warning as Error: Reference to type 'Iesi.Collections.Generic.HashedSet`1' claims it is defined in 'c:\TFS2\Parts\Developer\Web\packages\Iesi.Collections.\lib\net40\Iesi.Collections.dll', but it could not be found c:\TFS2\Parts\Developer\Web\packages\YUICompressor.NET.\lib\NET20\Yahoo.Yui.Compressor.dll Parts

FuriCuri wrote Jul 16, 2013 at 10:40 AM

Had to remove this from web.config/runtime/assemblyBinding:

            <assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
            <bindingRedirect oldVersion="" newVersion="" />

purekrome wrote Jul 16, 2013 at 3:10 PM

... And it's all working now, with the latest version?

FuriCuri wrote Jul 17, 2013 at 6:45 AM

I works, but I had to disable "warnings as errors" because I can't compile my project otherwise.

FuriCuri wrote Jul 24, 2013 at 1:58 PM

I'm still having problems with it on webserver.
Commenting/uncommenting dependentAssembly (as above) didn't work.

It says:
System.TypeInitializationException: The type initializer for 'Yahoo.Yui.Compressor.JavaScriptCompressor' threw an exception. ---> System.TypeLoadException: Could not load type 'Iesi.Collections.Generic.HashedSet`1' from assembly 'Iesi.Collections, Version=, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'.
Even tho there is Iesi.Collections.dll v4 in the bin directory.

FuriCuri wrote Jul 24, 2013 at 2:17 PM

I've tried to compile your YUI compressor from source codes with the latest Iesi v4 and it's seems impossible - there is no HashedSet in Iesi v4 (it was removed cause it's obsolete in .net 4).

So it seems you will have to revert your changed to nupackage back because now you say you support latest version of Iesi but in reality your library can work only with Iesi not higher than v3.

purekrome wrote Jul 24, 2013 at 2:52 PM

@FuriCuri - if you have a look at the packages folder, we are NOT dependant on Iesi v4.

The 'Core' library uses v 3.2

<package id="Iesi.Collections" version="" />

the nuget package ALSO specifies this exact version...

        <dependency id="EcmaScript.Net" version="" />
        <dependency id="Iesi.Collections" version="" />
so this means that the yuicompressor dll has an Iesi dll next to it .. and that Iesi dll is v4 (or greater than v

so the nuget package is saying it's right.

Double check your dlls in the bin dir.
Double check the web.config dependency section.

FuriCuri wrote Jul 25, 2013 at 6:19 AM

Thing is that with YUI compressor now can depend on Iesi v3 or higher. But the latest version of Iesi (v4) does not have HashedSet (which was present in Iesi v3 I think). So even tho I have correct libraries in my bin folder (latest YUI and v4 Iesi) it could not work together because of breaking changes in Iesi dll.

purekrome wrote Jul 25, 2013 at 7:04 AM

I'm not sure what to do if you have the Iesi v4 dll's in your bin. YUIC can't depend on v3 or higher .. just less than v4.

nuget pacakage says this:
<dependency id="Iesi.Collections" version="" />
meaning it HAS to have that version.

This is because YUIC is targetting .net 2.0 and Iesi v4 is for .net 4+.

I really don't know what to do here.

I'm thinking that you can try and have two copies of the dll .. and use a web.config to define what version to use where .. if that's possible.

like here:

FuriCuri wrote Jul 25, 2013 at 8:34 AM

I think the problem is with .NET version of the project that use YUI compressor. If you have .net 3.5 or less then nuget can't install Iesi v4 (since it requires .net 4) and installs Iesi v3 - and everything works fine.

But when you have project build on .net 4 or higher then nuget installs the latest Iesi v4 and YUI compressor unable to work with it.

The best solution is to provide two versions of YUI Compressor compiled for .net 2 and .net 4 (and maybe for .net 4.5). You can specify in nuget package config file the "target" attribute like "net4" or "net35": see (Grouping Assemblies by Framework Version).

freeranger wrote Jul 25, 2013 at 11:31 AM


We had multiple versions of yui before, but that was just more headache to maintain. There should be no reason we need two or three versions of this project.

nuget doesn't support side by side versioning so we can't go with that as an option.

Perhaps the solution in this case would be to bin off iesi completely and go with our own version of a hashed set or similar.

In the interim, you could always grab the source and make a .net4/iesi4 compatible version of yui for your own personal use

purekrome wrote Jul 25, 2013 at 2:16 PM

we used to have 2 different versions, but like Freeranger said - it was a PITA to manage.

FuriCuri wrote Jul 25, 2013 at 5:36 PM

Well, Dapper do have two different versions and they do it pretty easy: they've got two projects with files from one directory. In each project there are different .NET version settings and different symbol constants defined. In code there are #if condition that vary the code based on project symbol constants.

purekrome wrote Jul 28, 2013 at 1:38 PM

@furiCuri - leave it with me :) I'll dump Iesi completely and get it working, without requiring that dependency. watch this space in a few days.

FuriCuri wrote Jul 29, 2013 at 6:32 AM

Sounds awesome :)

purekrome wrote Aug 1, 2013 at 3:40 PM

New build (v2.3.0.0) of YUICompressor is up. try now and if it's working, i'll close this.


FuriCuri wrote Aug 2, 2013 at 6:43 AM

Works like a charm now. Thanks!

wrote Sep 13, 2013 at 11:30 AM