Build Failures on Orchard 1.7.1

Topics: Installing Orchard, Troubleshooting
Oct 24, 2013 at 3:32 PM
I'm having trouble with an upgrade to 1.7.1. I have a site running 1.6 with a number of customizations (a specific Theme, a custom module, a few additional modules). To upgrade, I basically took the fresh source of 1.7.1 and added my additional code into the solutions. Now, I'm trying to build and deploy to Azure and encountering trouble building it on our build server which has Azure SDK 2.0, 2.1, and some earlier versions installed.

Initially the unit tests were failing in the MSBuild AzurePackage.proj file, so I removed those completely. Now, the Package-Stage target is failing:

[Exec] F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\AzurePackage.proj(115, 5): error MSB3073: The command ""cspack" "F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\src\Orchard.Azure\Orchard.Azure.CloudService\ServiceDefinition.csdef" /role:Orchard.Azure.Web;"F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\src\Orchard.Azure\Orchard.Azure.Web\obj\Release\Package\PackageTmp";Orchard.Azure.Web.dll /sites:Orchard.Azure.Web;Web;"F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\src\Orchard.Azure\Orchard.Azure.Web\obj\Release\Package\PackageTmp" /rolePropertiesFile:Orchard.Azure.Web;"F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\src\Orchard.Azure\Orchard.Azure.Web\obj\Release\Properties.txt" /out:"F:\TeamCity\buildAgent\work\36c05cec6ed1d1f3\buildazure\Stage\Orchard.Azure.Web.cspkg"" exited with code 9009.

I noticed that on normal builds, the full file path to cspack is specified so I explicitly added that to the .proj file and got this error:

[Exec] cspack.exe CloudServices64 : Cannot find file named 'approot\bin\Startup\SetIdleTimeout.cmd' for startup task Startup\SetIdleTimeout.cmd of role Orchard.Azure.Web.

I'm unfamiliar with the ins and outs of MSBUILD and these string of errors has made me almost give up on this upgrade. Any suggestions? Our Ochard 1.6 builds are still working on this server.
Oct 24, 2013 at 4:15 PM
Edited Oct 24, 2013 at 4:17 PM
The AzurePackage.proj file no longer works and should no longer be used for Azure publishing from 1.7.1 and onwards (and indeed it has been removed for 1.7.2).

For more information please see:

As for the specific error you mentioned regarding SetIdleTimeout.cmd, you might have an old version of the source code ZIP file. Please see:
Nov 8, 2013 at 7:25 PM
Hey Decorum - I have a question that probably belongs to this thread. I was previously using AzurePackage.proj as the "Solution To Build" in my build definition in a continuous integration setup to an Azure cloud service. I have been trying to get continuous integration setup with 1.7.x, but haven't figured it out yet. I'm not familiar enough to know if I am going to need something similar to AzurePackage.proj or if there is another way.

I tried setting Orchard.Azure.CloudService.ccproj as the "Solution To Build" and playing with project build orders, but I don't understand the Orchard Azure solution enough to do much more then keep poking around in the dark. I would love to hear any insight that you may have.
Nov 8, 2013 at 8:08 PM
Hi Bill,

As far as I know, you should be able to simply select Orchard.Azure.sln as the solution to build for continuous deployment. The build definition workflow should then locate the first cloud service project (.ccproj) it finds within that solution, and use that for publishing. I have yet to try this out for myself, but someone who took the time to try this recently confirmed for me that it did work, at least for him. Let me know what you find out, as I'm interested in documenting this procedure in the Orchard documentation.
Marked as answer by Decorum on 11/11/2013 at 7:45 AM
Nov 8, 2013 at 8:25 PM
I don't have the problem of having to build on a TFS Server, so I don't envy @bill_cooper
For me it's just easier to run a build script and build a package and upload to the panel.

I hate having to involve Visual Studio if I don't have to.
This is a version of ClickToBuildAzurePackage that outputs to the app.publish folder.

@Decorum, let me know if you would like to add it to source. I can send a pull request.
if "%WindowsSdkDir%" neq "" goto build
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8on64
if exist "%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" goto initialize2k8
echo "Unable to detect suitable environment. Build may not succeed."
goto build

call "%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
goto build

call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
goto build

call "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build

call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build

msbuild src\Orchard.Azure\Orchard.Azure.CloudService\Orchard.Azure.CloudService.ccproj /fl /flp:logfile=build.log;verbosity=diagnostic /p:Configuration=Release /p:Platform=x64 /t:Publish /p:OutputPath="%cd%\\" /p:outdir="%cd%\build"
goto end

Nov 11, 2013 at 9:37 AM

Yeah that would be good - I guess more people than you have scenarios where it makes sense to build from the command line.
Nov 11, 2013 at 1:03 PM
Nov 11, 2013 at 1:35 PM

Yes, you were correct. I think I was over thinking it. I had originally tried using the Orchard.Azure.sln as the "solution to build" but it didn't work because I was using the wrong "Build process file". I was able to get it working when using the GetContinuousDeploymentTemplate.12.xaml (I am using TSF + Git) and using the Orchard.Azure.sln as the "solution to build"
Nov 11, 2013 at 2:45 PM
Glad it worked out!

Would you mind outlining the exact steps you took to set this up? I'd like to add a documentation topic for it.
Nov 11, 2013 at 4:43 PM
Sure, give me a few days to get it together, and I will get back with you.