Packaging a web app by Package Application in TFS Extension

I am using Octopus Deploy Integration Extension in TFS and I have three apps that I need to deploy at once: two of them are Windows services and the last one is an Azure web app.
I use MSBuild step in TFS to build the solution with all of the apps. Then I use three “Package Application” steps to package the apps. And then I push the packages to Octopus.
I have no problems with Windows services - I just package what I have in ‘bin’ folder and deploy it to the needed machine.
I also successfully package and deploy the web app to Azure, but there is one question.
In order to package a web app, I need to specify the root folder, which is one level higher than ‘bin’. In this case I package all the files that are in the folder and subfolders, including source code. But I actually need only dlls and configs in ‘bin’ folder and ‘web.config’ in the root folder.
I don’t have this problem when I publish the app from Visual Studio - only needed dlls and configs are published. But I need to build the solution in TFS and then deploy the apps with Octopus.
So please advise whether it is possible to package only the files that are actually built and not the source code.

Hi Serge,

Thanks for getting in touch. I think your best option would be to add OctoPack to your Web App project and following our documentation on getting that to produce the NuGet package for you and pushing it to Octopus. You could also use this on the windows services projects for consistency too.

Hope that helps and let me know if I can assist further.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.