Defining multiple nuspecs for a single project


I have a situation where I need my sole web project to be the basis for producing two packages via Team City and OctoPack i.e. an Authoring version or the site, and a Public version of the site.

I can create a nuspec for each variation of the site but then the file names won’t match the proj file name.

I’ll need environmental transforms (i.e. dev, test, uat, prod) for each site too.

Are there any best practice examples on how to do this?



Thanks for getting in touch! If you want Octopack to use a different nuspec file, you can pass in the parameter /p:OctoPackNuSpecFileName=[filename] to msbuild indicating the name of the file.

Hope that helps!


hi Dalmiro - how about if i want to specify multiple nuspec files because I want multiple packages? thanks


Since you’ll be building the same sole web project (only 1 sln file) which will include 2 different nuspec files, you’re gonna have to create 2 build configurations, each with a different value for /p:OctoPackNuSpecFileName=[filename]