Repository navigation
Description
This is a split of an original issue #68 which, after some analysis breaks out into more than one problem.
I'm using latest of Microsoft.AspNet.WebApi which (indirectly) pulls in Microsoft.Net.Http. NPE shows it's lib has:
The lib subdirs I've expanded do not have a a System.Net.Http.dll (all the others I've collapsed have) but the default paket install behavior uniformly adds:
Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.0'">
<ItemGroup>
<Reference Include="System.Net.Http">
<HintPath>..\packages\Microsoft.Net.Http\lib\net40\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework'">
<ItemGroup>
<Reference Include="System.Net.Http">
<HintPath>..\packages\Microsoft.Net.Http\lib\net40\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
This clashes with the framework reference I need to add (which #145 should really be adding) yielding:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
The description alludes to this by saying
This package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5, Windows 8, or Windows Phone 8.1 when consuming a library that uses this package.
The current workaround is to be very careful when switching platform from 4.0 <-> 4.5/4.5.1 to
- add the FW assembly reference (
<Reference Include="System.Net.Http" />) and delete thePaketprovided reference when going to 4.5 - remove the
<Reference Include="System.Net.Http" />AND remember to re-paket installwhen going to 4.0
The only solution I can see is that Paket needs to start picking the TargetFramework it's going to apply in a context and then using that to manage the complete set of files rather than treating each file individually.

Activity
bartelink commentedon Sep 23, 2014
Yet wackier again is NPEing
Microsoft.Bcl:(The various other variants with children have the same set of assemblies as
net40)Right now, Paket erroneously adds files/dirs when I target FW
4.5.1, which I need to delete to avoid warnings.I'd love to know what the
contentfolder is about - there is clearly no content in there for any target framework !Analyze installation of Microsoft.Bcl - references #145
Can detect monotouch and monoandroid - relates to #145
Detect win8 and wpa81 - references #145
Merge pull request #145 from Vidarls/fixstackoverflow