This project is read-only.

Publishing Orchard on Azure Web Sites using Git

Topics: General, Installing Orchard
Aug 9, 2013 at 1:03 PM
Orchard was last updated in git 10 months ago -

Is this no longer a recommended way of deploying Orchard on git? -
Aug 9, 2013 at 4:31 PM
Use the new instead. This will always be up to date from now on, because it's now the master repo.
Aug 10, 2013 at 7:23 AM
I tried using the source code unchanged but Azure didn't know what solution/project to deploy and it failed. I solved that error by adding a .deployment file:
project = src/Orchard.Web/Orchard.Web.csproj
After adding that file it deployed successfully but I get a new error message when I view the website:
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)'.
How do I fix this error?

Do you have updated instructions for installing from Git onto Azure? Contents of the repository is different to the one on GitHub and there are additional steps required.
Aug 10, 2013 at 1:17 PM
Also, I don't know much about Orchard but won't these lines in the .gitignore prevent modules and themes from being pushed to Azure? Aren't these the directories where modules and themes are installed?
Aug 11, 2013 at 8:41 AM
You still need whatever is pushed to Azure to be compiled. In particular, here it seems like the framework and core are not compiled.
Aug 11, 2013 at 11:15 AM
You need to compile the whole Orchard.Azure.sln, not Orchard.Web.csproj solely.
Aug 12, 2013 at 12:34 AM
How do I do that? The .deployment file lets you specify either a directory or a project -

What about the .gitignore file I pointed out? It looks like it has been explicitly setup to exclude any customizations made to Orchard which is a problem when pushing to a deployed website. It will also exclude any compiled dlls.

Can I ask why aren't you are changing things? It was a simple and elegant process and you're changing it to push complexity to the user.
Aug 12, 2013 at 1:29 AM
I don't think the git repo that you point Azure to can be the main Orchard repo: Kudu doesn't know how to compile a solution, does it? So it seems like the most automated you could achieve would be by having a CI server build from the core repo, into a "built" repo, and that's what you point Azure to.
Aug 12, 2013 at 1:31 AM
Edited Aug 12, 2013 at 1:31 AM
Oh, and we are not really changing things. Those were two different things, built for different purposes. The built repo is still there, it's just that we don't have the bandwidth to maintain it. If someone wants to take that over, in particular using a CI server like I described above, that would be great.
Aug 12, 2013 at 8:12 AM
Kudu (the Azure git deployment engine) is able to compile web projects:

So any thoughts on how to make this work?
Aug 12, 2013 at 9:09 AM
Projects, yes, not solutions. I explained how to make it work.
Aug 12, 2013 at 11:48 AM
I'm just going to deploy from the built files in the zip. Using git was to simplify things, not make it more complicated.
Aug 12, 2013 at 11:22 PM
I will update the Kudu repository ASAP. It still makes sense even if we are on git now. It's a different distribution, with different settings.
I am sick right now so you will have to wait for tomorrow unfortunately.
Aug 12, 2013 at 11:29 PM
Thanks. Do you think it could be automated through the CI server so you don't have to manage this too much going forward?
Aug 15, 2013 at 2:49 PM
Edited Aug 15, 2013 at 2:49 PM
ooo, a kudu repo update would be awesome :) get well soon though seb,
Aug 28, 2013 at 7:48 PM
Just curious, what settings are different between a "normal" tree and the Kudu repository?
Aug 28, 2013 at 9:01 PM
It's not settings that are different, it's the contents: Kudu will need the web site only, not the whole source code.
May 31, 2014 at 4:18 PM
May I bump this ?

I just tried to deploy OrchardCMS to an azure website via git.
My .deployment files looks like this :
project = src/Orchard.Web/Orchard.Web.csproj
The solution seems to build and deploy, but I get an identical error as the one described in the first post.
Jun 2, 2014 at 5:24 PM
you deployment file should look like this:
project = .
Jun 3, 2014 at 9:39 AM
Same error ...

Just to be clear, I've created a .deployment file at the root of the checkout (which contains the lib, src, build.cmd, Orchard.proj etc ...), NOT in the src folder.
Jun 3, 2014 at 7:51 PM
What you can do is try to grab the file from the download page, add the .deployment file to it, and publish.
Jun 8, 2014 at 1:56 AM
Edited Jun 8, 2014 at 2:10 AM
Edit - ignore previous comment ...

So doing a git deploy from the compiled files in seems to work, though it defeats the purpose of using git for deployments ...

So what's missing from a git source deploy ?