I deploy several projects at one Octopus Deploy server. Some of the project names (i. e. Web) are the same between different Octopus projects. So when I publish these packages to a Octopus nuget feed, I guess they will overwrite each other (in case of the same version number). So what can I do about it? Is there any way to specify a namespace or prefix for packages for a specific Octopus Deploy project?
0
votes
1 Answers
1
votes
In order to control the name of the NuGet package to keep it unique, set the id tag within the .nuspec file. Then when you create the NuGet file it will be named accordingly.
e.g.
Here I have a .nuspec named the same as my project (Octopack convention), but the id tag has a string containing the name of the NuGet file I want to create.
This is being built using TeamCity and it produces a NuGet package with the id I specified.
Rather than pushing to the in-built Octopus NuGet feed I am pulling from the TeamCity NuGet feed
So, the key is using the id tag in the .nuspec file
See the Nuspec Reference for further details.
Hope this helps