{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/423","labels_url":"https://api.github.com/repos/NuGet/Home/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/423/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/423/events","html_url":"https://github.com/NuGet/Home/issues/423","id":68351222,"number":423,"title":"Can't resolve compatible packages if update is initiated on \"wrong\" package","user":{"login":"mrahl","id":9974216,"avatar_url":"https://avatars.githubusercontent.com/u/9974216?v=3","gravatar_id":"","url":"https://api.github.com/users/mrahl","html_url":"https://github.com/mrahl","followers_url":"https://api.github.com/users/mrahl/followers","following_url":"https://api.github.com/users/mrahl/following{/other_user}","gists_url":"https://api.github.com/users/mrahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mrahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrahl/subscriptions","organizations_url":"https://api.github.com/users/mrahl/orgs","repos_url":"https://api.github.com/users/mrahl/repos","events_url":"https://api.github.com/users/mrahl/events{/privacy}","received_events_url":"https://api.github.com/users/mrahl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-14T12:05:51Z","updated_at":"2015-05-04T08:44:08Z","closed_at":"2015-04-14T20:38:43Z","body":"We create a whole suite of interdependent NuGet packages and we have seen several scenarios where updates don't work. I have simplified the repro for one such issue to a diamond dependency graph:\r\n\r\n```\r\n   A\r\n /   \\\r\nB     C\r\n \\   /\r\n   D\r\n```\r\nAssume all packages have version 1.0 and support version range [1.0, 2.0) on their dependencies. Then we release D 2.0 and compatible versions of the others: \r\nA 1.1 Dep: B [1.1, 2.0), C [2.0, 3.0) \r\nB 1.1 Dep: D [2.0, 3.0) \r\nC 2.0 Dep: D [2.0, 3.0) \r\n\r\nIf the update is initiated on either A, C or D it succeeds to update all packages, but if it is initiated on B the update fails: \"Updating 'D 1.0' to 'D 2.0' failed. Unable to find a version of 'C' that is compatible with 'D 2.0'.\" \r\n\r\nAre we doing something wrong with our dependencies and/or versions? \r\n\r\n__Why not update A?__\r\n\r\nThis is a reduced case of a much larger dependency graph and only one of several different cases of such large graphs where this fails, so it is very hard for the consumers of our packages to know how to trigger the update. \r\n\r\nAn open Update-Package (without specifying package) is quite likely to fail as well if it happens to start with the wrong package. With a solution of several projects the problem gets even worse since the initiating package which works in one of the projects may not work in another project so a solution wide update. \r\n\r\n__Why does the depencency look like this?__\r\n\r\nImagine D is a framework, B and C are products and A is a plugin for B, integrating C. That is also a reason you may be inclined to trigger the update on B rather than A (there could be multiple plugins for B so B is the main package you install). \r\n\r\n__Additional repro info__\r\nThis was reproduced using Nuget 2.8.5. Both the full and the reduced scenario have been reproduced in unit tests using the 2.8.5 source (that is how I managed to reduce the scenario). \r\n\r\nI have also tried to repro this case on Nuget 3 beta 2, using the real world packages with the larger dependency graph, but it fails with a null reference exception on some linq projection by the look of it."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/98638235","html_url":"https://github.com/NuGet/Home/issues/423#issuecomment-98638235","issue_url":"https://api.github.com/repos/NuGet/Home/issues/423","id":98638235,"user":{"login":"mrahl","id":9974216,"avatar_url":"https://avatars.githubusercontent.com/u/9974216?v=3","gravatar_id":"","url":"https://api.github.com/users/mrahl","html_url":"https://github.com/mrahl","followers_url":"https://api.github.com/users/mrahl/followers","following_url":"https://api.github.com/users/mrahl/following{/other_user}","gists_url":"https://api.github.com/users/mrahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mrahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrahl/subscriptions","organizations_url":"https://api.github.com/users/mrahl/orgs","repos_url":"https://api.github.com/users/mrahl/repos","events_url":"https://api.github.com/users/mrahl/events{/privacy}","received_events_url":"https://api.github.com/users/mrahl/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T08:44:08Z","updated_at":"2015-05-04T08:44:08Z","body":"Test in PR now, sorry for the delay."}}