Local Development when using Azure

Topics: General
Jun 2, 2011 at 7:16 PM

Really quick question here on the best way to do this so I don't screw anything up. I downloaded the source using TortoiseHG, added my modules, generated an Azure package and deployed it. I'm using Azure Web and Azure SQL. Everything works great. One of the modules that is in that package is the project I'm currently developing. I don't want to have to create a package and deploy it every time I want to test what I'm developing though.

Can I run the site locally on my computer and not screw up the source code so that I can still create an Azure package and deploy it? I currently have the Orchard.Azure solution open in VS...should I open a different one to develop in and run locally? Can I connect it to my Azure SQL database?

Thanks =)

Jun 2, 2011 at 7:47 PM


First, you should develop your module without Azure in mind, using the normal Orchard VS.NET solution, and when it works, update the Azure solution and create a package.

If your module is targeting Azure specifically, then it's ok to use the Azure specific solution, and then you can run it locally, using F5, and the dev fabric. You can even use your SQL Azure instance by change the default azure settings file, in src\Orchard.Azure\Orchard.Azure.CloudService


Jun 2, 2011 at 8:03 PM

Thanks for the info...if I use the normal Orchard VS.NET solution, when I run it for the first time, I get the setup page asking me for a data source. If I put in my SQL Azure connection string, is that going to cause it to attempt to create all the default tables again and cause an error? Can I somehow point it to my existing SQL Azure instance with a connection string?

The module is not targeting Azure specifically, so I'd like to develop in the normal Orchard VS.NET solution and update the Azure solution. It's really just the data source since I already have quite a bit setup in the database, I'd like to not have to duplicate that locally. Thanks.

Jun 2, 2011 at 8:13 PM

You should be able to reuse an exissting database by updating the App_data/Sites/Default/Settings.txt file, which contains it, once it's already installed locally with the same modules. But be careful as local changes, new enabled modules will be done in the db, and might become inconsistent with was it in Azure.

You might also want to copy your remote db locally.

Jun 2, 2011 at 9:35 PM

You're right...it was easier to just make a local SQL CE database to work off of for development. Thanks again for the help.