{"action":"created","issue":{"url":"https://api.github.com/repos/fsprojects/Paket/issues/1505","repository_url":"https://api.github.com/repos/fsprojects/Paket","labels_url":"https://api.github.com/repos/fsprojects/Paket/issues/1505/labels{/name}","comments_url":"https://api.github.com/repos/fsprojects/Paket/issues/1505/comments","events_url":"https://api.github.com/repos/fsprojects/Paket/issues/1505/events","html_url":"https://github.com/fsprojects/Paket/issues/1505","id":139502147,"number":1505,"title":"Incorrect conditional references created for group dependencies","user":{"login":"kevinbosman","id":1317846,"avatar_url":"https://avatars.githubusercontent.com/u/1317846?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinbosman","html_url":"https://github.com/kevinbosman","followers_url":"https://api.github.com/users/kevinbosman/followers","following_url":"https://api.github.com/users/kevinbosman/following{/other_user}","gists_url":"https://api.github.com/users/kevinbosman/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinbosman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinbosman/subscriptions","organizations_url":"https://api.github.com/users/kevinbosman/orgs","repos_url":"https://api.github.com/users/kevinbosman/repos","events_url":"https://api.github.com/users/kevinbosman/events{/privacy}","received_events_url":"https://api.github.com/users/kevinbosman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fsprojects/Paket/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-09T07:48:32Z","updated_at":"2016-03-09T12:32:49Z","closed_at":"2016-03-09T11:27:58Z","body":"Case in point:\r\nNuGet package [EasyNetQ v0.53.6.419](https://www.nuget.org/packages/EasyNetQ/0.53.6.419) has the following nuspec dependency list:\r\n```\r\n    <dependencies>\r\n      <group>\r\n        <dependency id=\"RabbitMQ.Client\" version=\"[3.5.7, ]\" />\r\n        <dependency id=\"Microsoft.Bcl\" version=\"1.1.10\" />\r\n        <dependency id=\"Microsoft.Bcl.Async\" version=\"1.0.168\" />\r\n        <dependency id=\"Microsoft.Bcl.Build\" version=\"1.0.21\" />\r\n      </group>\r\n      <group targetFramework=\".NETFramework4.5\">\r\n        <dependency id=\"RabbitMQ.Client\" version=\"[3.5.7, ]\" />\r\n      </group>\r\n    </dependencies>\r\n```\r\n\r\nThe desired behaviour is that framework >= net45 should NOT need the references to Microsoft.Bcl.*; everything else should.\r\n\r\nGiven my paket.dependencies contains:\r\n```\r\nnuget EasyNetQ ~> 0.53.6 framework: >= net45\r\n```\r\n\r\nPaket v2.51.7 incorrectly creates the following reference conditionals in the project file, which are exactly inverted:\r\n```\r\n  <Choose>\r\n    <When Condition=\"$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')\">\r\n      <ItemGroup>\r\n        <Reference Include=\"Microsoft.Threading.Tasks.Extensions.Desktop\">\r\n          <HintPath>..\\packages\\Microsoft.Bcl.Async\\lib\\net40\\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>\r\n          <Private>True</Private>\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n        <Reference Include=\"Microsoft.Threading.Tasks.Extensions\">\r\n          <HintPath>..\\packages\\Microsoft.Bcl.Async\\lib\\net40\\Microsoft.Threading.Tasks.Extensions.dll</HintPath>\r\n          <Private>True</Private>\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n        <Reference Include=\"Microsoft.Threading.Tasks\">\r\n          <HintPath>..\\packages\\Microsoft.Bcl.Async\\lib\\net40\\Microsoft.Threading.Tasks.dll</HintPath>\r\n          <Private>True</Private>\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n        <Reference Include=\"System.Net\">\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n      </ItemGroup>\r\n    </When>\r\n  </Choose>\r\n```\r\npaket.lock also incorrectly contains:\r\n```\r\n    EasyNetQ (0.53.6.419) - framework: >= net45\r\n      Microsoft.Bcl (>= 1.1.10)\r\n      Microsoft.Bcl.Async (>= 1.0.168)\r\n      Microsoft.Bcl.Build (>= 1.0.21)\r\n      RabbitMQ.Client (>= 3.5.7)\r\n    Microsoft.Bcl (1.1.10) - framework: >= net45\r\n      Microsoft.Bcl.Build (>= 1.0.14)\r\n    Microsoft.Bcl.Async (1.0.168) - framework: >= net45\r\n      Microsoft.Bcl (>= 1.1.8)\r\n    Microsoft.Bcl.Build (1.0.21) - import_targets: false, framework: >= net45\r\n    RabbitMQ.Client (3.6.1) - framework: >= net45\r\n```\r\n\r\nFor completeness, the project file also correctly contains:\r\n```\r\n  <Choose>\r\n    <When Condition=\"$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')\">\r\n      <ItemGroup>\r\n        <Reference Include=\"EasyNetQ\">\r\n          <HintPath>..\\packages\\EasyNetQ\\lib\\net45\\EasyNetQ.dll</HintPath>\r\n          <Private>True</Private>\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n      </ItemGroup>\r\n    </When>\r\n  </Choose>\r\n   <Choose>\r\n    <When Condition=\"$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')\">\r\n      <ItemGroup>\r\n        <Reference Include=\"RabbitMQ.Client\">\r\n          <HintPath>..\\packages\\RabbitMQ.Client\\lib\\net45\\RabbitMQ.Client.dll</HintPath>\r\n          <Private>True</Private>\r\n          <Paket>True</Paket>\r\n        </Reference>\r\n      </ItemGroup>\r\n    </When>\r\n  </Choose>\r\n```"},"comment":{"url":"https://api.github.com/repos/fsprojects/Paket/issues/comments/194275900","html_url":"https://github.com/fsprojects/Paket/issues/1505#issuecomment-194275900","issue_url":"https://api.github.com/repos/fsprojects/Paket/issues/1505","id":194275900,"user":{"login":"forki","id":57396,"avatar_url":"https://avatars.githubusercontent.com/u/57396?v=3","gravatar_id":"","url":"https://api.github.com/users/forki","html_url":"https://github.com/forki","followers_url":"https://api.github.com/users/forki/followers","following_url":"https://api.github.com/users/forki/following{/other_user}","gists_url":"https://api.github.com/users/forki/gists{/gist_id}","starred_url":"https://api.github.com/users/forki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forki/subscriptions","organizations_url":"https://api.github.com/users/forki/orgs","repos_url":"https://api.github.com/users/forki/repos","events_url":"https://api.github.com/users/forki/events{/privacy}","received_events_url":"https://api.github.com/users/forki/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T12:32:49Z","updated_at":"2016-03-09T12:32:49Z","body":"really?\r\n\r\njust to make sure there is no cache issue.\r\n\r\nCan you please run paket clear-cache and try the update again?"}}