Unable to get continuous build integration working with TFS 2012 and Azure

Topics: Core, General, Installing Orchard, Troubleshooting
Jun 12, 2013 at 4:34 PM

I'm having an issue setting up continuous build integration with Orchard, TFS 2012, and Azure.

The issue is that the package uploaded to azure is missing the "Core", "Modules", and "Themes" folder. Because these files are missing it causes the website not to work.

If I run the ClickToBuildAzurePackage.cmd it creates a package that contains the "Core", "Modules", and "Themes" folder. This is because it references AzurePackage.proj which copies the neccesary files into the package.

The issue is that in my build configuration I cannot make reference to ClickToBuildAzurePackage.cmd. I instead need to specify a solution to build. Right now I am using $/<Name of Project>/Source Code/src/Orchard.Azure/Orchard.Azure.sln. which is what is referenced inside of AzurePackage.proj. However I cannot for the life of me figure out a way to have the build reference the AzurePackage.proj file which will copy over the missing files. I tried adding this as a parameter to "MSBuild Arguments" which is underneath Advanced under the Process tab for configuring your build.

Anyone know what I'm doing wrong. Has anyone got continuous integration from TFS to Azure working? Is there something simple I'm missing?

Jun 12, 2013 at 5:53 PM
Edited Jun 12, 2013 at 5:53 PM
It has nothing to do with orchard : in TFS, you can point the build definition to a .proj instead of a .sln (in the browse for project to build dialog, be sure to change the filter).
Jun 12, 2013 at 9:40 PM
Thanks for the tip.

So I ended up using the DefaultTemplate.11.1.xaml as part of TFS CI and it seems like the build is successful however it is not going over to azure. If I use the AzureContinuousDeployment.11.xaml as part of TFS CI it sends the orchard source code to Azure minus "Core", "Modules", and "Themes" because with this template your required to choose a .sln file and you can't pick a .proj.

Do you know how to modify the DefaultTemplate.11.1.xaml to send the information over to azure or how to modify AzureContinuousDeployment.11.xaml to work with a .proj file?
Jun 13, 2013 at 9:47 AM
Search google for "tfs edit build worlflow".

But you don't have to edit xaml to use proj file, as I said, you only need to edit the build definition : see this screenshot.
Jun 27, 2013 at 2:32 PM
Edited Jul 1, 2013 at 3:22 PM
You can get it to work (I'm currently working on a blog post to detail the whole process), but what you are running into with not being able to build using the "proj" file is half of the problem. It does build - but it chokes afterwards in a build task that looks for the cloud service project. That task throws and exception if you are not building a "sln" file. Which then causes the whole build to fail.

I'll post an update when I get the blog post ready.

By the way: what version of the Windows Azure SDK are you using? 1.8 or 2.0?

The blog that details the process that worked for us is here: http://www.cloudconstruct.com/blog/continuous-delivery-for-an-orchard-cloud-service-in-windows-azure