{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/3013","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/3013/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/3013/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/3013/events","html_url":"https://github.com/NuGet/Home/issues/3013","id":161561184,"number":3013,"title":"Nuget update doesn't throw error when a higher version restricted by allowedVersions constraint","user":{"login":"jainaashish","id":18219758,"avatar_url":"https://avatars.githubusercontent.com/u/18219758?v=3","gravatar_id":"","url":"https://api.github.com/users/jainaashish","html_url":"https://github.com/jainaashish","followers_url":"https://api.github.com/users/jainaashish/followers","following_url":"https://api.github.com/users/jainaashish/following{/other_user}","gists_url":"https://api.github.com/users/jainaashish/gists{/gist_id}","starred_url":"https://api.github.com/users/jainaashish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jainaashish/subscriptions","organizations_url":"https://api.github.com/users/jainaashish/orgs","repos_url":"https://api.github.com/users/jainaashish/repos","events_url":"https://api.github.com/users/jainaashish/events{/privacy}","received_events_url":"https://api.github.com/users/jainaashish/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NuGet/Home/labels/Area:%20Updates","name":"Area: Updates","color":"fbca04"},{"url":"https://api.github.com/repos/NuGet/Home/labels/Type:Bug","name":"Type:Bug","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"jainaashish","id":18219758,"avatar_url":"https://avatars.githubusercontent.com/u/18219758?v=3","gravatar_id":"","url":"https://api.github.com/users/jainaashish","html_url":"https://github.com/jainaashish","followers_url":"https://api.github.com/users/jainaashish/followers","following_url":"https://api.github.com/users/jainaashish/following{/other_user}","gists_url":"https://api.github.com/users/jainaashish/gists{/gist_id}","starred_url":"https://api.github.com/users/jainaashish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jainaashish/subscriptions","organizations_url":"https://api.github.com/users/jainaashish/orgs","repos_url":"https://api.github.com/users/jainaashish/repos","events_url":"https://api.github.com/users/jainaashish/events{/privacy}","received_events_url":"https://api.github.com/users/jainaashish/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-06-21T23:14:59Z","updated_at":"2016-06-23T01:44:20Z","closed_at":null,"body":"Issue:\r\nI've a package with 1.0 and 2.0 versions where 1.0 is already installed and 2.0 is restricted by allowedVersions range define in package.config (allowedVersions=\"[1.0, 2.0)\" ) now execute below command from PMC:\r\n\r\n`update-package -Id AashishTestPackage -Source https://api.nuget.org/v3/index.json -ProjectName ConsoleApplication1`\r\n\r\nExpected:\r\n\r\nIt should have throw error something \"unable to resolve this package....\" since available version was restricted by constraint.\r\n\r\nActual:\r\n\r\nIt simply said \"There are no new updates available.\" and passed.\r\n\r\nWorkaround:\r\nspecify -Version attribute in update-package command, then it will successfully throw that error."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/227927616","html_url":"https://github.com/NuGet/Home/issues/3013#issuecomment-227927616","issue_url":"https://api.github.com/repos/NuGet/Home/issues/3013","id":227927616,"user":{"login":"emgarten","id":6381138,"avatar_url":"https://avatars.githubusercontent.com/u/6381138?v=3","gravatar_id":"","url":"https://api.github.com/users/emgarten","html_url":"https://github.com/emgarten","followers_url":"https://api.github.com/users/emgarten/followers","following_url":"https://api.github.com/users/emgarten/following{/other_user}","gists_url":"https://api.github.com/users/emgarten/gists{/gist_id}","starred_url":"https://api.github.com/users/emgarten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emgarten/subscriptions","organizations_url":"https://api.github.com/users/emgarten/orgs","repos_url":"https://api.github.com/users/emgarten/repos","events_url":"https://api.github.com/users/emgarten/events{/privacy}","received_events_url":"https://api.github.com/users/emgarten/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T01:44:20Z","updated_at":"2016-06-23T01:44:20Z","body":"Here is the behavior in 2.8.6\r\n\r\n```\r\nPM> install-package newtonsoft.json -version 6.0.1\r\nInstalling 'Newtonsoft.Json 6.0.1'.\r\nSuccessfully installed 'Newtonsoft.Json 6.0.1'.\r\nAdding 'Newtonsoft.Json 6.0.1' to ConsoleApplication1.\r\nSuccessfully added 'Newtonsoft.Json 6.0.1' to ConsoleApplication1.\r\n```\r\n\r\n**Add constraint**\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<packages>\r\n  <package id=\"Newtonsoft.Json\" version=\"6.0.1\" targetFramework=\"net45\" allowedVersions=\"[6.0.0, 7.0.0)\" />\r\n</packages>\r\n```\r\n\r\n**Update**\r\n\r\n```\r\nPM> update-package Newtonsoft.Json\r\nUpdating 'Newtonsoft.Json' from version '6.0.1' to '6.0.8' in project 'ConsoleApplication1'.\r\nRemoving 'Newtonsoft.Json 6.0.1' from ConsoleApplication1.\r\nSuccessfully removed 'Newtonsoft.Json 6.0.1' from ConsoleApplication1.\r\nAdding 'Newtonsoft.Json 6.0.8' to ConsoleApplication1.\r\nInstalling 'Newtonsoft.Json 6.0.8'.\r\nSuccessfully installed 'Newtonsoft.Json 6.0.8'.\r\nSuccessfully added 'Newtonsoft.Json 6.0.8' to ConsoleApplication1.\r\nUninstalling 'Newtonsoft.Json 6.0.1'.\r\nSuccessfully uninstalled 'Newtonsoft.Json 6.0.1'.\r\n```\r\n\r\n**Update again**\r\n\r\n```\r\nPM> update-package Newtonsoft.Json\r\nApplying constraint 'Newtonsoft.Json (≥ 6.0.0 && < 7.0.0)' defined in packages.config.\r\nNo updates available for 'Newtonsoft.Json' in project 'ConsoleApplication1'.\r\n```\r\n\r\nIt has extra about why it didn't update, but it doesn't consider it an error. Maybe go with that behavior?"}}
{"actor":{"display_login":"emgarten"}}