Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base NuGet Lib Reference generation on Lib Folders #145

Closed
bartelink opened this issue Sep 22, 2014 · 1 comment
Closed

Base NuGet Lib Reference generation on Lib Folders #145

bartelink opened this issue Sep 22, 2014 · 1 comment
Labels
Milestone

Comments

@bartelink
Copy link
Member

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:

image

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 the Paketprovided reference when going to 4.5
  • remove the <Reference Include="System.Net.Http" /> AND remember to re-paket install when 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.

@bartelink
Copy link
Member Author

Yet wackier again is NPEing Microsoft.Bcl:

image

(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 content folder is about - there is clearly no content in there for any target framework !

@forki forki added the bug label Oct 7, 2014
@forki forki added this to the NewInstaller milestone Oct 7, 2014
forki added a commit that referenced this issue Oct 7, 2014
@forki forki closed this as completed Jan 31, 2015
forki added a commit that referenced this issue Jun 3, 2015
Reverted Fsharp.core from nuget package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants