Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Push nuget package from visual studio to devops artifact

$
0
0

I'm trying to automate the push of a nuget package from Visual Studio to Azure Devops Artifact when I'm build the solution.I'm able to do that utomatically on my local nuget repository, but I'm not able to do it on my Azure repo. It fails with a 401 (unathorized) because I cannot put credentials on the command and the VS credential are not used.To automate the publishing Ive set this command on the project file:

<Target Name="NugetAdd" AfterTargets="Pack"><exec command="nuget add $(OutputPath)$(PackageId).$(PackageVersion).nupkg -source d:\NuGetLocal" />    <exec command="nuget push -source MyAzureRepo -ApiKey VSTS $(OutputPath)$(PackageId).$(PackageVersion).nupkg" />    </Target>

The first command is executed successfully, and the second fails because credential are requested. If I run the command in a powershell it runs without problem, asking for credentials.There is a way to make it working?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>