This project is read-only.

Unable to deploy Orchard Azure project - YSOD fresh off sources

Topics: General, Installing Orchard
Aug 14, 2013 at 11:36 PM
Edited Aug 14, 2013 at 11:38 PM
I am deploying Orchard to Azure cloud services (webrole) without any code changes to the official stable release. However, when I navigate to that freshly deployed Orchard cloud service (webrole), I see a YSOD with Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

As a work around, if I enable Local Copy=True (i.e. modify source), then this specific YSOD goes but is replaced by another one for msshrtmi). But more importantly, I'm able to deploy the pre-built downloaded Orchard Azure (1.7, prebuilt off same GIT src tag), without issues, so I'd rather fix the root issue than go down a rabbit hole of workarounds and drift further from the official sources.

Steps to reproduce
  • Download source from GIT (, I used commit 5e0c26f73cf5)
  • Run ClickToBuildAzurePackage.cmd script
  • Edit buildazure\Stage\ServiceConfiguration.cscfg to put in connection string's to point to the real Azure storage account (vs Local Storage).
  • Deploy both the files in buildazure\Stage to Azure via the portal
  • Navigate to site (eg:
  • Enjoy the yellow-screen-of-death :(
Build system specs
  • Windows 8, x64
  • VS2012.3
  • Azure SDK 1.7, 1.8, 2.0

Has anyone deployed Orchard to Azure Cloud Services (not "Azure Websites") successfully? Any ideas how to resolve this issue?
Aug 14, 2013 at 11:52 PM
Aug 15, 2013 at 2:39 AM
Thanks! That's interesting because I had initially tried the deployment from inside VS2012 (right click publish the cloud project) but switched to the "ClickToBuildAzure.cmd" method because I was still seeing YSODs.

Basically, either approach gives me the same YSOD. I now suspect there may be some external factors not handled by the build/package project scripts in GIT. Is there any way I can help debug this issue? I can't think of anything special about our development machines, so there must be others affected by this?
Aug 16, 2013 at 5:59 AM
Edited Aug 16, 2013 at 7:16 AM
So I was able to get it working thanks in part to a response on stackoverflow

  • I uninstalled all the Azure SDKs (all may be overkill, but it's 5 mins each so what the heck!)
  • Reinstalled Azure SDK 2.0 (Since 2.1 is now out and hard to find 2.0, here is a trick. Fire up "Microsoft Web Platform Installer" => Products => Windows Azure => scroll to Windows Azure SDK for .NET (VS 2012) - 2.0)
  • Build via the ClickToBuildAzurePackage.cmd script
  • Deploy via HTML portal
  • Navigate (and see the welcome screen - awesome!)
However, based on your prior comment, I do want to report that if I build from inside VS2012 (right click cloud project => build), then I get an error as below. This is probably another issue and while it skips the super nice tooling and features found inside VS2012, we can at least deploy!
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func`1[Autofac.Features.OwnedInstances.Owned`1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable`1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable`1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable`1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
Aug 16, 2013 at 7:20 AM
Edited Aug 16, 2013 at 7:21 AM
Today is a good day for Orchard!

Even that last error (build+deployment from within VS2012, see above) has been resolved after picking up the patches recently pushed to the 1.x. This is awesome. The speed I'm seeing on Azure Cloud Services is also very nice - much faster than our Azure Websites version.

Orchard is ready for mainstream.