How to do version control of Nuget package in bamboo pipeline - nuget

How to do version control of Nuget package in bamboo pipeline? please help in this.
Not able to find the script or method.

Related

How should c# references be handled when working with DevOps artifacts?

I am new to DevOps. I will explain my structure first.
Project 1>
Repo 1
Repo 2
I am trying to make two build pipelines one that will build Repo 1 and a second that will build repo 2.
Repo 2 has a dependency on Repo1.dll.
I understand that I can publish the Repo1.dll and then download the artifact in repo2's pipeline.
My trouble is, our developers normal workflow is to have both repo's running in debug on their machines using a project reference. I am having trouble understanding how to reference Repo 1 from Repo 2 in a way that the artifact can be used in DevOps and project reference can be used on the developers machines.
How should c# references be handled when working with DevOps artifacts?
The best way to do this is using the NuGet.
When you build Repo 1 and create the nuget package Package1. Then publish this package Package1 to the Azure devops feed.
Now, add this package Package1 to the solution2 in the Visual Studio from the feed.
When we update the repo1, we need to build the NuGet package, publish it to the feed, then update the refernces package version to refer to the package you just publish.

Created a NuGet pipeline in azure devops

I have created a NuGet pipeline as my build pipeline in my Azure devops. AM getting some error while building the pipeline
Install-Package EnterpriseLibrary.ExceptionHandling.Logging -Version 5.0.505
You can try checking the Restore NuGet Packages option in the build tasks. Sometimes the retore nuget option need to be check in VSBuild task too.

Create NuGet package from folder

I need to package an Azure function app that we've built in TeamCity as a Nuget package for deployment via Octopus Deploy. Standard practice would be to use MSBuild and OctoPack but with Azure Functions this will not work as the function.json files are created after the build is complete and they would therefore not be included in any package that OctoPack creates.
So I need to build first and then create a package from the \bin\Release\net471 folder. Would be grateful to hear peoples opinions on the best way to acheive this?
In the end I went with octo.exe using a start directory of \bin\Release\net471 which saved me having to create a nuspec file as I would have had to if using the NuGet CLI or dotnet pack

Command to update packages repo in PackageManager console

I need to update package repo before building a solution in TFS Build Definition. I want to implement this using CommandLine build task.
Could someone tell me how to write a command to update package repo using a path.
According to your prior question, there are just missing some external packages during your TFS build pipeline.
Usually TFS use Package Management that hosts NuGet, npm, and Maven packages alongside all your other TFS assets: source code, builds, releases, etc, also be able to handle the external packages.
You could directly add external packages to a TFS Package Management feed. When you restore the packages, select the feed. All need packages will be restored entirely. To achieve this, just use Push NuGet packages to specify the packages you want to publish and the target feed location.
More details please refer Get started with NuGet Package Management in TFS

URL to Publish to TeamCity NuGet server

Trying to use PowerShell's Publish-Module to upload a PowerShell Module to TeamCity's NuGet server.
I can use PowerShell with Find-Module to find modules that were added to TeamCity from previous build artefacts, but would also like to upload "manually".
On other NuGet Servers I am used to see the /Packages/ folder. Does that not exist on TeamCity?
Thanks.
TeamCity NuGet feed is readonly. The only way to publish a package is running a build and publish it as an artifact.