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?