{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/1813","labels_url":"https://api.github.com/repos/NuGet/Home/issues/1813/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/1813/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/1813/events","html_url":"https://github.com/NuGet/Home/issues/1813","id":120578115,"number":1813,"title":"NuGet 3.3.exe returns non-zero exit code on successful publish","user":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-05T18:31:18Z","updated_at":"2015-12-07T17:52:22Z","closed_at":null,"body":"All of our build systems that depend on FAKE have now begun experiencing an error during NuGet push attempts as a result of changes made to NuGet.exe itself.\r\n\r\nSample logs:\r\n\r\n```\r\nPushing nuget packages\r\n[17:45:42][Step 1/1] Pushing D:\\BuildAgent\\work\\2de53b95e0be9250\\bin\\nuget\\NBench.0.1.0.nupkg Attempts left: 3\r\n[17:45:42][Step 1/1] Pushing NBench 0.1.0 to the NuGet gallery (https://www.nuget.org)...\r\n[17:45:47][Step 1/1] Your package was pushed.\r\n[17:45:47][Step 1/1] Pushing NBench 0.1.0 to the symbol server (https://nuget.smbsrc.net/)...\r\n[17:46:42][Step 1/1] Pushing D:\\BuildAgent\\work\\2de53b95e0be9250\\bin\\nuget\\NBench.0.1.0.nupkg Attempts left: 2\r\n[17:46:42][Step 1/1] Pushing NBench 0.1.0 to the NuGet gallery (https://www.nuget.org)...\r\n[17:46:43][Step 1/1] Failed to process request. 'A package with id 'NBench' and version '0.1.0' already exists and cannot be modified.'. \r\n[17:46:43][Step 1/1] The remote server returned an error: (409) Conflict..\r\n[17:46:43][Step 1/1] Pushing D:\\BuildAgent\\work\\2de53b95e0be9250\\bin\\nuget\\NBench.0.1.0.nupkg Attempts left: 1\r\n[17:46:44][Step 1/1] Pushing NBench 0.1.0 to the NuGet gallery (https://www.nuget.org)...\r\n[17:46:44][Step 1/1] Failed to process request. 'A package with id 'NBench' and version '0.1.0' already exists and cannot be modified.'. \r\n[17:46:44][Step 1/1] The remote server returned an error: (409) Conflict..\r\n[17:46:44][Step 1/1] Pushing D:\\BuildAgent\\work\\2de53b95e0be9250\\bin\\nuget\\NBench.0.1.0.nupkg Attempts left: 0\r\n[17:46:45][Step 1/1] Pushing NBench 0.1.0 to the NuGet gallery (https://www.nuget.org)...\r\n```\r\n\r\nCorresponding code\r\n\r\n```fsharp\r\nlet publishNugetPackages _ = \r\n    let rec publishPackage url accessKey trialsLeft packageFile =\r\n        let tracing = enableProcessTracing\r\n        enableProcessTracing <- false\r\n        let args p =\r\n            match p with\r\n            | (pack, key, \"\") -> sprintf \"push \\\"%s\\\" %s\" pack key\r\n            | (pack, key, url) -> sprintf \"push \\\"%s\\\" %s -source %s\" pack key url\r\n\r\n        tracefn \"Pushing %s Attempts left: %d\" (FullName packageFile) trialsLeft\r\n        try \r\n            let result = ExecProcess (fun info -> \r\n                    info.FileName <- nugetExe\r\n                    info.WorkingDirectory <- (Path.GetDirectoryName (FullName packageFile))\r\n                    info.Arguments <- args (packageFile, accessKey,url)) (System.TimeSpan.FromMinutes 1.0)\r\n            enableProcessTracing <- tracing\r\n            if result <> 0 then failwithf \"Error during NuGet symbol push. %s %s\" nugetExe (args (packageFile, \"key omitted\",url))\r\n        with exn -> \r\n            if (trialsLeft > 0) then (publishPackage url accessKey (trialsLeft-1) packageFile)\r\n            else raise exn\r\n    let shouldPushNugetPackages = hasBuildParam \"nugetkey\"\r\n    let shouldPushSymbolsPackages = (hasBuildParam \"symbolspublishurl\") && (hasBuildParam \"symbolskey\")\r\n    \r\n    if (shouldPushNugetPackages || shouldPushSymbolsPackages) then\r\n        printfn \"Pushing nuget packages\"\r\n        if shouldPushNugetPackages then\r\n            let normalPackages= \r\n                !! (nugetDir @@ \"*.nupkg\") \r\n                -- (nugetDir @@ \"*.symbols.nupkg\") |> Seq.sortBy(fun x -> x.ToLower())\r\n            for package in normalPackages do\r\n                publishPackage (getBuildParamOrDefault \"nugetpublishurl\" \"\") (getBuildParam \"nugetkey\") 3 package\r\n\r\n        if shouldPushSymbolsPackages then\r\n            let symbolPackages= !! (nugetDir @@ \"*.symbols.nupkg\") |> Seq.sortBy(fun x -> x.ToLower())\r\n            for package in symbolPackages do\r\n                publishPackage (getBuildParam \"symbolspublishurl\") (getBuildParam \"symbolskey\") 3 package\r\n```\r\n\r\nIssue appears to be that NuGet.exe no longer returns a 0 exit code upon successful publish. What was the reasoning behind this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/162606427","html_url":"https://github.com/NuGet/Home/issues/1813#issuecomment-162606427","issue_url":"https://api.github.com/repos/NuGet/Home/issues/1813","id":162606427,"user":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T17:52:22Z","updated_at":"2015-12-07T17:52:22Z","body":"Yeah, we have plenty of ways to work around this issue - right now we're just downgrading the version of NuGet.exe being used back to 2.* (whatever the highest minor version number was.)\r\n\r\nBut I'd really like an explanation from the NuGet.exe team - having to revert back to an older build across 12+ OSS projects is not cool."}}