1
votes

How can i pack NuGet package from a project file using the teamcity with some apply additional metadata(dependency, app.conf), if i using a .csproj file as the.nupsec file, how and where can i add other meta data for the package

1

1 Answers

1
votes

The easiest way is to create a real .nuspec file rather than relying on the .csproj and version it. The format is really simple and well documented. You can add any additional dependency under the <dependencies> node and any additional file under the <files> node.

Then, under TeamCity, add a new build step of type "NuGet Pack", point to the .nuspec file in your repository and you're done.

Additionally, if you have enabled the TeamCity NuGet Server and want to publish the package onto it, simply check "Publish created packages to build artifacts" and they will be deployed automatically. Otherwise, you can create a NuGet Publish build step and point to the created .nupkg to publish it on other feeds.