First, you'll need a few tools:
- Microsoft.NET 4
- Visual Studio 2010 (see this link [insert link] for information about using open source alternatives)
- WiX 3.5 (required only to build the MSI for installing MDWS - you'll need to exclude the mdws-setup project from the solution if you don't install WiX. The installed can be found here: http://wix.codeplex.com/releases/view/60102)
- WSE 3.0 (this can no longer be downloaded from Microsoft. [Insert link] for download location)
- Git tool of your choice. The below how-to uses the command line interface
- TestDriven.NET - free for open source project developers (that's you!)
- Sqlite - find the correct installer for your environment: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
- Oracle ODAC - download 32 bit if you're on a 32 bit machine, 64 bit if you're on a 64 bit development machine: http://download.oracle.com/otn/other/ole-oo4o/ODAC112030_x64.zip (sorry about this one... there are some serious issues with the dotnet Oracle provider which necessitated the use of Oracle's libraries)
- Visual Studio 2010 Web Deployment Project Add-In http://www.microsoft.com/en-us/download/details.aspx?id=24509
MDWS consists of two projects under two separate repositories: MDO and MDWS. MDWS is a relatively thin layer that exposes MDO as web services. MDO does all the "heavy lifting" - it knows how to talk to VistA and other data sources - and exposes data via MDOs (Medical Domain Objects - the MDO object library) on the API.
1. Create a directory for the files wherever you prefer on your development machine - I call mine "MDWS".
2. Clone the MDWS and MDO repositories. Do this from the top level MDWS folder (or whatever you named the container folder in step 1). I use the git command line tool with these commands:
$ git clone --recursive https://github.com/OSEHRA/mdo.git
$ git clone https://github.com/OSEHRA/mdws.git
Your top level MDWS folder should now look like this:
And your MDO folder like:
3. MDO can be opened indepedently - it has it's own .sln file. However, this how-to will focus on opening the project as a whole since MDWS currently depends on MDO. This tutorial assumes you're using Visual Studio 2010. There are other efforts to use open source development tools [insert links] but the concepts should be the same. Navigate inside the MDWS folder and double click the mdws.sln file.
4. Some users have reported the following error when first opening the project. It's no big deal - just right-click in Solution Explorer and choose "Reload Project" and the WiX project will be loaded in (if you installed WiX as indicated in the tools list above)
5. Before we build, we need to place the dependencies in the correct location. Unzip the libs.zip file in to "MDWS/MDO/mdo-test/resources/" directory so that your directory structure looks like:
6. Now, we can right-click the mdo-test (this will build MDO too) project in Solution Explorer and choose Build. If that completes successfully, you can build the MDWS project, then mdws-test, then the MDWS web deplpoyment project (mdws.csproj_deploy) and then finally the installer (mdws-setup). Building them one at a time in this order helps each project to find the necessary dependencies.
7. Everything works! If you want to really get crazy, you can run the mdo-test and mdws-test unit test suites:
Now get coding!
* Some users have reported Visual Studio is unable to find the installed Oracle and/or SQLite components. I believe this is due simply to changes in released versions. You can simply right click the offending reference in Solution Explorer > References, remove and re-add. If anyone knows how to convince VS not to care about the version (more accurately - I think it's the public key in the build files causing this "issue"), I'd love to hear about it!