{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/988","labels_url":"https://api.github.com/repos/NuGet/Home/issues/988/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/988/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/988/events","html_url":"https://github.com/NuGet/Home/issues/988","id":96653266,"number":988,"title":"NuGet.CommandLine - packing a project file uses first .nuspec file in the project directory when multiple nuspecs exist.","user":{"login":"dmccaffery","id":1803684,"avatar_url":"https://avatars.githubusercontent.com/u/1803684?v=3","gravatar_id":"","url":"https://api.github.com/users/dmccaffery","html_url":"https://github.com/dmccaffery","followers_url":"https://api.github.com/users/dmccaffery/followers","following_url":"https://api.github.com/users/dmccaffery/following{/other_user}","gists_url":"https://api.github.com/users/dmccaffery/gists{/gist_id}","starred_url":"https://api.github.com/users/dmccaffery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmccaffery/subscriptions","organizations_url":"https://api.github.com/users/dmccaffery/orgs","repos_url":"https://api.github.com/users/dmccaffery/repos","events_url":"https://api.github.com/users/dmccaffery/events{/privacy}","received_events_url":"https://api.github.com/users/dmccaffery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/12","html_url":"https://github.com/NuGet/Home/milestones/Client-VNext","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/12/labels","id":1107554,"number":12,"title":"Client-VNext","description":"This is the place of the issues we intend to consider in one of the future versions.\r\n\r\nPlacing an issue here does not mean we intend to act on it, it means it looks promising enough to have a deeper dive into it, or that we don't have it planned for the current or one of the planned future releases.","creator":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":0,"state":"open","created_at":"2015-05-12T21:08:40Z","updated_at":"2015-07-22T20:27:08Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-07-22T20:10:06Z","updated_at":"2015-07-22T21:04:34Z","closed_at":null,"body":"Consider the following project structure:\r\n\r\n./MyCompany.MyProject/\r\n|__ MyCompany.MyProject.csproj\r\n|__ MyCompany.MyProject.nuspec  (tokenized nuspec)\r\n|__ A.nuspec (manually composed)\r\n\r\nIn previous versions of the CLI, executing the following command would use the expected tokenized nuspec:\r\n\r\nnuget pack MyCompany.MyProject.csproj\r\n\r\nIn NuGet 2.8.6 (and maybe older builds), NuGet seems to locate the first nuspec it finds in alphabetical order, rather than relying on the specification being named the same as the project name.\r\n\r\nThis results in the A.nuspec (which doesn't even rely on the build output of the csproj) being used instead of the expected MyCompany.MyProject.nuspec that is tokenized.\r\n\r\nI can see the reasoning for doing this, it makes it less likely for a pack to fail if a typo exists, or the project is renamed without renaming the nuspec.\r\n\r\nI recommend requiring an exact match of the name of the nuspec whenever more than one nuspec exists in the project path. In this way, if only one nuspec exists, it can be called whatever you want and it will \"just work\"; otherwise, it is impossible to determine which one of the nuspec files is the right one to use."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/123863224","html_url":"https://github.com/NuGet/Home/issues/988#issuecomment-123863224","issue_url":"https://api.github.com/repos/NuGet/Home/issues/988","id":123863224,"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":"2015-07-22T21:04:34Z","updated_at":"2015-07-22T21:04:34Z","body":"Thanks for the investigation, we will take a look at how this can be improved in a later release without breaking back compat."}}