Sitelet https://github.com/fsprojects/Paket/issues/2652
Skip to content

Paket adds wrong dependencies when using NuGet v3 source #2652

Description

@csmager

Description

Paket is installing a dependency for Portable+Win81+Wpa81 when the target framework is net45. This only seems to happen for the v3 NuGet feed.

The package is ReactiveUI, and you can see the nuspec here.

<group targetFramework="net45" >
    <dependency id="Rx-Main" version="2.2.5" />
    <dependency id="Splat" version="[1.4.0,2)" />
    <dependency id="Rx-Xaml" version="2.2.5" />
</group>
<group targetFramework="Portable-Win81+Wpa81" >
    <dependency id="Rx-Main" version="2.2.5" />
    <dependency id="Splat" version="[1.4.0,2)" />
    <dependency id="Rx-Xaml" version="2.2.5" />
    <dependency id="Rx-WinRT" version="2.2.5" />
</group>

When I install the package, I get this in my lock file:

RESTRICTION: == net452
NUGET
  remote: https://api.nuget.org/v3/index.json
    reactiveui (7.4)
      reactiveui-core (7.4)
    reactiveui-core (7.4)
      Rx-Main (>= 2.2.5)
      Rx-Main (>= 2.2.5)
      Rx-WinRT (>= 2.2.5)
      Rx-Xaml (>= 2.2.5)
      Splat (>= 1.4 < 2.0)
      Splat (>= 1.4 < 2.0)

And this in my project file:

<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5.2'">
  <ItemGroup>
	<Reference Include="System.Reactive.WindowsRuntime">
	  <HintPath>packages\Rx-WinRT\lib\portable-win81+wpa81\System.Reactive.WindowsRuntime.dll</HintPath>
	  <Private>True</Private>
	  <Paket>True</Paket>
	</Reference>
  </ItemGroup>
</When>

Repro steps

Run paket install with a paket.dependencies file containing these lines:

framework: net452
source https://api.nuget.org/v3/index.json
nuget reactiveui

Known workarounds

Change the source to https://www.nuget.org/api/v2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions