I have one Project.sln in my GitRepo. And I need to build 4 NuGet packages with different configurations (local, qa, sandbox and production). I'm using TeamCity with Octopus Deploy.
In TeamCity my Build Configuration has the following Build Steps:
1) NuGet Installer
2) Build Project.sln with *Local* Configuration
3) NuGet Pack with using .csproj file
4) NuGet Installer
5) Build Project.sln with *QA* Configuration
6) NuGet Pack with using .csproj file
7) NuGet Installer
8) Build Project.sln with *Sandbox* Configuration
9) NuGet Pack with using .csproj file
10) NuGet Installer
11) Build Project.sln with *Production* Configuration
12) NuGet Pack with using .csproj file
And I have the following problems:
1) When I'm using AssemblyInfo patcher it makes only one NuGet package file. On step number 3 TeamCity creates a package with name 2.2.1.%build.counter%. And on step number 6 it creates a package with the same name and overwrites it. It does the same on steps 9 and 12. Finally I have only one NuGet package with last configuration (in my case it's Production).
I want to have 4 packages like:
2.2.1.%build.counter%_local
2.2.1.%build.counter%_qa
2.2.1.%build.counter%_sandbox
2.2.1.%build.counter%_production
2) The next problem is with Octopus. When TeamCity makes packages (it makes 4 packages, but without AssemblyInfo patcher), it makes them with the same id (Project) and when I'm trying to Deploy "some" (let it be QA) package to the QA environment, Octopus asks me to select the id of a NuGet package. And it only sees one id - "Project". I think it is the last package created by TeamCity.

2.2.1.%build.counter%.you should be using2.2.1.%build.counter%-qaetc. - Jack Ukleja