I have a project where I want to use SQL Server Compact Edition and SharpDevelop. I also want to use Git for version control.
To use SQL Server CE, I download and install it on C:\Program Files\Microsoft SQL Server Compact Edition\4.0\
and when I use it in my SharpDevelop project I add a reference to C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop\System.Data.SqlServerCe.dll
Then I use Git to push my project files to a Git repository. And on the other computer I clone the Git repository and pull the project files.
But now when I start SharpDevelop on the second machine, the referenced file C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop\System.Data.SqlServerCe.dll
can not be found.
So how should I solve this? Should I simply install SQL Server Compact Edition on the exact same path on second machine? or is there any better alternatives like adding the file to the Git repository?
Before I worked on a Java project in Eclipse, and then I added all external library files to the projects lib/
directory and added to the Git repository.
Put it in your Git repository and reference it from there.
That's the best way to have it available on all machines without having to install it on every single one.
Take a look at any open source project - they have all referenced files in their repository as well (usually in a folder called "libs" or something like that), because that's the only manageable way to deal with multiple developer machines all over the world and multiple dependencies.
EDIT:
Yes, exactly!
However, SQL Server CE needs more DLLs in order to work, not just the single one that you referenced!
I never used SQL Server CE myself, but according to this MSDN link (the second part, "Private file–based deployment") you need to put the following seven files in your project:
I know, this is for SQL Server CE 3.5 and you are using 4.0, but I didn't find a similar explanation for 4.0.
I hope they didn't change that in v4.0 :-)