This project is read-only.

How do you handle App_Data XML and BIN files in a VCS?

Topics: Writing modules
Sep 24, 2012 at 5:42 PM
Edited Sep 24, 2012 at 5:43 PM

My team has a small Orchard site in a Git repository. Every time we pull changes we have to manually merge these four files:




What is the purpose of these files and would it be safe to exclude them from source control?

Sep 24, 2012 at 6:42 PM

Those files are generated and should be ignored in Git. For that matter, why do you include anything in app_data?

Sep 25, 2012 at 2:49 PM

I don't know :D The shared SQL Server connection string is in Sites/Default/Settings.txt. It's convenient to be able to clone a repository and have a working site without any setup.

Sep 25, 2012 at 3:44 PM

A shared sql server is a terrible idea for development...

So easy to kill it while developing + you can get in trouble when user A does a database change while user B doesn't have the required changes yet to work with the database change.

Only takes one bad migration while development to screw the whole team...

We all have separate sql server instances that we regularly 'sync' with a dump from the live database.

Sep 25, 2012 at 4:08 PM

Interesting, can you give an example of "user A does a database change while user B doesn't have the required changes yet to work with the database change" corrupting an Orchard site or DB?


How do you manage the files in app_data, do you exclude the complete folder?

Sep 25, 2012 at 4:12 PM
Edited Sep 25, 2012 at 4:15 PM

And about the 'corruption' : user B drops and adds a column in a migration (+ the property).
User A doesn't have this new class yet, and will get an error.
He then has to wait till you commit the modified class + migration. Then you need to update your sources and then it should work again.

This is just one example that comes to mind.

About managing files in App_Data: I include the folder on TFS, but it is 'empty' (as in none of the files are checked in).

Sep 25, 2012 at 5:07 PM

Thanks a lot Aim!


What does a new dev need to do to connect his local site to his local synced DB?

Sep 25, 2012 at 5:38 PM

I usually exclude app_data completely and sometimes use recipes to bring a common set of content items into a new instance. You can even make that a setup recipe if you want.

Sep 26, 2012 at 7:23 AM

Well, we just launch Orchard once and let it use the sql server.

Then once the bare Orchard setup is working, we replace the orchard database with the 'live' dump.

Oct 1, 2012 at 1:31 PM

Great, thanks guys!