0
votes

I'm trying to configure VSTS build that will publish NuGet package to internal feed. Puckage is being created successfully but have issue with NuGet Publisher. When NuGet publisher is trying to publish package then I got error:

Using credentials from config. UserName: VssSessionToken
Pushing PackageName_20170608-081053 to 'https://...visualstudio.com/_packaging/b5ae5df2-b73e-4af2-...-66df-4340-8e68-9d4be0071ba8/nuget/v2/'...
PUT https://...visualstudio.com/_packaging/b5ae5df2-b73e-4af2-...-66df-4340-8e68-9d4be0071ba8/nuget/v2/
System.InvalidOperationException: Failed to process request. 'Method Not Allowed'. 
The remote server returned an error: (405) Method Not Allowed.. ---> System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
...
Error: d:\a\_tasks\NuGetPublisher_333b11bd-d341-\0.2.34\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1
Packages failed to publish

I've already checked permissions to feed and Project Collection Build Service is added as a contributor. I've also tried to play with NuGet versions but it didn't help.

1
What’s the project type that you want to package? Try to set system.debug to true and queue build, then check whether there are detail errors. What’s the result if you try it with a new feed? On the other hand, try to NuGet version to 3.5 or 4.0, then queue build. (Select NuGet Publisher task > Advanced> Select different NuGet version.starian chen-MSFT

1 Answers

0
votes

The issue was that I was trying to publish to release view. Instead I have to push the package to a feed first.

Here are details: https://github.com/Microsoft/vsts-tasks/issues/4493