Repository navigation
Closed
Labels
Description
Create a paket.dependencies file as follows: -
source https://nuget.org/api/v2
nuget WindowsAzure.Storage
The lock file generated looks like this: -
NUGET
remote: https://nuget.org/api/v2
specs:
Microsoft.Data.Edm (5.6.3)
Microsoft.Data.OData (5.6.3)
Microsoft.Data.Edm (5.6.3)
System.Spatial (5.6.3)
Microsoft.Data.Services.Client (5.6.3) - net40
Microsoft.Data.OData (5.6.3)
Microsoft.WindowsAzure.ConfigurationManager (2.0.3) - net40
Newtonsoft.Json (6.0.6) - net40
System.Spatial (5.6.3)
WindowsAzure.Storage (4.3.0)
Microsoft.Data.OData (>= 5.6.2)
Microsoft.Data.OData (>= 5.6.2) - net40
Microsoft.Data.OData (>= 5.6.2) - winv4.5
Microsoft.Data.OData (>= 5.6.2) - wpv8.0
Microsoft.Data.Services.Client (>= 5.6.2) - net40
Microsoft.WindowsAzure.ConfigurationManager (>= 1.8.0.0) - net40
Newtonsoft.Json (>= 5.0.8) - net40
Newtonsoft.Json (>= 5.0.8) - wpv8.0
Notice the net40 restrictions on a number of dependencies. On a brand new FSharp Class Library (using net45), these are not available for consumption within code. For example, for Newtonsoft.Json, the only node in the .fsproj file is: -
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.0'">
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
If you remove the net40 from the lock file and then do a paket install --hard, everything works fine. You get multiple When elements in the project file, one for each version made available by the dependency.
Activity
forki commentedon Dec 21, 2014
Mhm the nuspec specifies the net40 restriction. See:
Nuget.exe will still install Json.Net.dll - strange.
forki commentedon Dec 21, 2014
Ok, after rereading #140 (comment) and remembering disucssion with @agross I now think we need to do the same framework inheritance strategy as in the file referencing algorithm.
isaacabraham commentedon Dec 21, 2014
Yeah that was my thought - net40 should fall back to any higher FWs as well unless specified elsewhere.
isaacabraham commentedon Dec 21, 2014
I think that this was the root cause of #448 as well.
Add WindowsAzure.Storage.nuspec - references #462
forki commentedon Dec 21, 2014
It's actually much more complicated than I thought, but I'm starting to work on it...
isaacabraham commentedon Dec 21, 2014
:-( sorry!
forki commentedon Dec 21, 2014
/cc @cdrnet
forki commentedon Dec 22, 2014
the new lockfile looks like that:
forki commentedon Dec 22, 2014
The Lockfile for MathNet.Numerics looks like that:
cdrnet commentedon Dec 22, 2014
Great, that looks exactly like what I intended in the MathNet.Numerics nuspec!
forki commentedon Dec 22, 2014
please test 0.20 alpha - it's a huge change
isaacabraham commentedon Dec 22, 2014
awesome :-) will check shortly :-)
isaacabraham commentedon Dec 23, 2014
Just tried using the latest v20 alpha (6) and it works fine. Great stuff.
cdrnet commentedon Dec 23, 2014
I've just tried with v20 alpha 7 as well, with a package with even more complicated framework groups: MathNet.Numerics.FSharp-v3.3.0 (sorry! - ah, and yes, the next version will migrate to the new FSharp.Core NuGet package)
The intention of these groups is to have the MathNet.Numerics dependency in all cases, and the FSharp.Core dependency everywhere except .Net3.5 <= x < .Net 4.0. The group without a target framework acts as fallback where none of the groups is inherited by the current target.
Now, with v20alpha7 the dependencies file
leads to the lock file
The lock on TaskParallelLibrary is now perfect, but to my understanding the MathNet.Numerics dependency should not have any framework constraints, or at least the >=net40 one dropped?
cdrnet commentedon Dec 23, 2014
Hm, maybe I better simplify these constraints instead, they are way too complicated ...
forki commentedon Dec 23, 2014
Yes I thought about that case. Thanks for giving a test case. Will try to solve that.
forki commentedon Dec 27, 2014
now gives:
Solve case for empty restrictions - references #462
forki commentedon Dec 27, 2014
seems there is still an issue with FSharp.Core.Microsoft.Signed!?
isaacabraham commentedon Dec 27, 2014
Also seen that Humanizer isn't working getting referenced on the latest alpha. Looking at the package, it has a single folder in the lib folder:
portable-win%2Bnet40%2Bsl50%2Bwp8%2Bwpa81. Yet on a .NET 4.5.1 project, despite there being an entry in the lock and references files, there's no entry in the .fsproj (not even one with a bad When condition).In fact I can't even reference this dll directly - it looks like the + in the lib folder have been URL encoded. If I manually rename the lib folder to have + instead of %2B, it all works.
forki commentedon Dec 27, 2014
Isaac, can you please create a repro sample and open a new issue. I tried to reproduce, but Humanizer works fine for me.
isaacabraham commentedon Dec 27, 2014
Sure. Let me remove the package completely and redownload it first.
isaacabraham commentedon Dec 27, 2014
Bizarre. Just redownloaded it and it came down fine without %2B. Sorry.