<p>I managed to resolve this by installing the Nuget package Octopack on the projects that I wanted to be deployed as either separate websites or website applications.</p>

<p>In this context, I installed Octopack to the 3 projects in green squares and checked-in the changes. Then on the Octopus Deploy side, I created 3 separate IIS deploy steps and just followed the typical steps. Octopus deploy now receives a NuGet package from TeamCity using the Octopus deploy plugin, Octopack build step, from there Octopus deploy has 3 IIS deploy steps, one for the main website and 2 for the website applications, each was given a custom directory path but after I had installed the Octopack NuGet packages into the appropriate projects in the solution through Visual Studio it was smooth sailing just using the general user-guide and tutorial videos.</p>

<p>@richard slater - Thank-you for letting me know about Octopack and nuspec, these were some of the key missing pieces that I needed.</p>

<p>TLDR - If you want to deploy projects in a solution as separate websites, install the Octopus Deploy plugin to TeamCity and follow the basic tutorials, add the Octopack NuGet package to the projects you want as separate websites or web applications, set-up the Octopack step to push to Octopus Deploy over the API and use IIS steps in Octopus Deploy and you should be golden.</p>

CC BY-SA 4.0
2019-11-12T22:11:07.660Z
2019-11-12T22:11:07.660Z
HQ216493
<p>It <em>can</em> be achieved, however, you will make your life easier if you modify your TeamCity build process to create a package for each IIS Website then deploy each one individually using a <a href="https://octopus.com/docs/deployment-examples/iis-websites-and-application-pools" rel="nofollow noreferrer">Deploy to IIS</a> step.</p>

<p>If it's impossible to change your build process then you will need to do some pre-processing or just deploy the websites through a <a href="https://octopus.com/docs/deployment-examples/custom-scripts" rel="nofollow noreferrer">custom script</a>.</p>

CC BY-SA 4.0
2019-11-07T17:43:41.237Z
so I would either create a PowerShell script to split the different projects from the .zip or Nuget package first and then use separate Octopus Deploy steps to deploy each project to IIS separately or modify TeamCity to spit out a separate package per project and have Octopus Deploy use Deploy to IIS. Is the latter option best practice? Note: I have added a screenshot to the OP to show how I need to set-up the deployment.
HQ216493
CC BY-SA 4.0
2019-11-07T17:58:46.887Z
Yes, splitting out your packages is best practice.  Break stages down into small components so that you get better feedback loops, I.e if /api fails then you know you need to look into the API.
Richard Slater
CC BY-SA 4.0
2019-11-07T18:52:19.227Z
Okay, I'll look into how to get TeamCity to take a multi-project solution and output multiple packages ready for Octopus Deploy to grab them. Off-hand do you have any resources that I should look at to do this?
HQ216493
CC BY-SA 4.0
2019-11-07T18:55:39.090Z
Create multiple Nuget packages with multiple nuspec files.   https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package
Richard Slater
CC BY-SA 4.0
2019-11-07T17:34:07.767Z
2019-11-07T17:34:07.767Z
Richard Slater
<p>I'm tasked with setting up CI/CD for my company. I'm using TeamCity which I have configured using the Octopus Deploy plugin to create a Nuget package to the appropriate dev server (alternatively, I can have TeamCity spit out a .zip). </p>

<p>The package itself is a solution that contains several projects, and each project needs to be deployed to different folders on IIS. Is this something that I can accomplish with Octopus Deploy, and if so how? </p>

<p>I've looked through the documentation and spent a lot of time Googling but I haven't found an example of someone doing this but I want to use Octopush Deploy because of the reporting and flexibility it provides (since I will need to set up pipelines to other environments in the future).</p>

<p>Information about the solution and environment:
Multi-project solution
.NET Framework 4.6.1
IIS version 6.2
Windows Server 2012 R2
Octopus Deploy v6.0 on-site
TeamCity Professional 2019.1.1 (build 66192)</p>

<p>The solution is currently deployed on ISS like this:</p>

<p><a href="https://i.sstatic.net/OrUBo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OrUBo.png" alt="Snippet of IIS setup of multi-project solution"></a></p>

<p>Any assistance provided or links to resources is deeply appreciated.</p>

<p>Kind regards.</p>

<continuous-deployment><teamcity><octopus-deploy>
On-Site Octopus Deploy - How to deploy projects in a multi-project solution to different IIS locations
HQ216493
# On-Site Octopus Deploy - How to deploy projects in a multi-project solution to different IIS locations

(Asked by: username_0 on 2019-11-07)

I'm tasked with setting up CI/CD for my company. I'm using TeamCity which I have configured using the Octopus Deploy plugin to create a Nuget package to the appropriate dev server (alternatively, I can have TeamCity spit out a .zip).

The package itself is a solution that contains several projects, and each project needs to be deployed to different folders on IIS. Is this something that I can accomplish with Octopus Deploy, and if so how?

I've looked through the documentation and spent a lot of time Googling but I haven't found an example of someone doing this but I want to use Octopush Deploy because of the reporting and flexibility it provides (since I will need to set up pipelines to other environments in the future).

Information about the solution and environment:
Multi-project solution
.NET Framework 4.6.1
IIS version 6.2
Windows Server 2012 R2
Octopus Deploy v6.0 on-site
TeamCity Professional 2019.1.1 (build 66192)

The solution is currently deployed on ISS like this:

[![Snippet of IIS setup of multi-project solution](https://i.sstatic.net/OrUBo.png)](https://i.sstatic.net/OrUBo.png)

Any assistance provided or links to resources is deeply appreciated.

Kind regards.

**Tags:** continuous-deployment, teamcity, octopus-deploy


---

## 2 answers

### Answer by username_0 on 2019-11-12. Score: 0 | Accepted answer

I managed to resolve this by installing the Nuget package Octopack on the projects that I wanted to be deployed as either separate websites or website applications.

In this context, I installed Octopack to the 3 projects in green squares and checked-in the changes. Then on the Octopus Deploy side, I created 3 separate IIS deploy steps and just followed the typical steps. Octopus deploy now receives a NuGet package from TeamCity using the Octopus deploy plugin, Octopack build step, from there Octopus deploy has 3 IIS deploy steps, one for the main website and 2 for the website applications, each was given a custom directory path but after I had installed the Octopack NuGet packages into the appropriate projects in the solution through Visual Studio it was smooth sailing just using the general user-guide and tutorial videos.

@richard slater - Thank-you for letting me know about Octopack and nuspec, these were some of the key missing pieces that I needed.

TLDR - If you want to deploy projects in a solution as separate websites, install the Octopus Deploy plugin to TeamCity and follow the basic tutorials, add the Octopack NuGet package to the projects you want as separate websites or web applications, set-up the Octopack step to push to Octopus Deploy over the API and use IIS steps in Octopus Deploy and you should be golden.


---

### Answer by username_1 on 2019-11-07. Score: 1

It *can* be achieved, however, you will make your life easier if you modify your TeamCity build process to create a package for each IIS Website then deploy each one individually using a [Deploy to IIS](https://octopus.com/docs/deployment-examples/iis-websites-and-application-pools) step.

If it's impossible to change your build process then you will need to do some pre-processing or just deploy the websites through a [custom script](https://octopus.com/docs/deployment-examples/custom-scripts).

> **Comments:**
> **username_0**: so I would either create a PowerShell script to split the different projects from the .zip or Nuget package first and then use separate Octopus Deploy steps to deploy each project to IIS separately or modify TeamCity to spit out a separate package per project and have Octopus Deploy use Deploy to IIS. Is the latter option best practice? Note: I have added a screenshot to the OP to show how I need to set-up the deployment.  
> **username_1**: Yes, splitting out your packages is best practice.  Break stages down into small components so that you get better feedback loops, I.e if /api fails then you know you need to look into the API.  
> **username_0**: Okay, I'll look into how to get TeamCity to take a multi-project solution and output multiple packages ready for Octopus Deploy to grab them. Off-hand do you have any resources that I should look at to do this?  
> **username_1**: Create multiple Nuget packages with multiple nuspec files.   https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package  

---

