web publish in Vs2010 and webconfig transform

Topics: General, Installing Orchard, Troubleshooting
Jul 31, 2011 at 8:24 PM
Edited Jul 31, 2011 at 8:32 PM

I'd like to stay with the "classical" web deployment and publish feature integrated in VS2010.

From what I have tested if you publish direcly form the Source web app you get a deployment working correcly but the size will be very large (about 566 mb!)

If you try to compile with the "ClickToBuild.cmd" and open the in Visual Studio 2010 the web site that is generated in the Stage folder you will get no error if you browse it or use Webmatrix.

If you try to compile it with VS2010 will find missing stuff as the Modules folder is included by default .

My error was "missing Orchard.Blog etc but I do not think this is important as creating an empty Mvc 3 web application and copying all the dirs and files from the Stage dir and excluding the Modules folder solved the compilation issue.

Before publish/deploy I checked that in the publishing setting the option "Items to deploy" was on "All files in the project folder" and that the "Exclude App_Data folder" was unchecked.

In this way the application compiles and deploys correctly with a  deployed  size of approx 28 mb.

As Orchard doesn't use  web config transformation and  uses a setting.txt file in the App_data/Sites/Default folder I changed the connection string directly on the file deployed on the server (I am using an Sql2008 db) and then checked the "Exclude App_Data folder" in the package/publish settings.

Now everithing runs smoothly but I wonder if it is possible to generate with the ClickToBuild.cmd a simple web application with a project that can be openened in Visual Studio (not as web site but as web app with references etc),  do a clean rebuild, and deploy with the web config transformation (may be with just an override flag in the web config?

As for the setting.txt file I also tried to rename the folder containing the Settings.txt from Default to the host name of the production server but this didn't worked, do I need to enable Multitenant?

Aug 2, 2011 at 2:29 AM

mm, no, we deployment from VS should give you a deployment that is less than 30MB. You do not want to configure it to deploy all files though. The very heavy weight you're seeing is from the bin folders of each modules, which *you don't need*.

ClicktoBuild builds something that is meant to be deployed, from a full source clone. I'm wondering why you would want it to be openable in Visual Studio as it is the output of your build process. As long as the source can be open in VS, I don't see a problem.

I do agree that we need a release settings mechanism to facilitate such deployments.

Sep 13, 2011 at 3:06 PM

Because when you open the ouput of the build process you can deploy there files directly with Visual Studio. If you publish with the source opended in visual studio you publish also all de dll's from the modules.