I had a Virtual PC instance die recently. Oddest thing - it wouldn’t accept network traffic anymore. If it wasn’t virtual I’d have assumed it was a hardware problem.

I need to create an RC2 build of Spark, so I need to recreate a suitable platform. To kill two birds with one stone I thought I would keep track of the software I installed to be able to run the Spark distribution build.

Started by paving a new virtual machine with Windows Server 2008 x86 version. Ran Windows Update. Decided to skip the malicious software removal tool, on account of my love of malicious software.

Created a standard user and logged on as that account. Remember, good security practices start at home kids. Created a share on the host machine to hold downloaded files to avoid browsing on the new build machine.

Installed source control client msysgit which at the moment is Git-1.6.2.2-preview20090408.exe. Two options are changed from the default.

The first is to “Run Git and included Unix tools from the Windows Command Prompt.” I’ve been using Linux enough to think using ls -la or rm -rf on Windows isn’t really that out of place.

The second is to “Commit line endings as they are.” Without this setting you’ll have an autocrlf switch set to true. The net result of that switch is to randomize the meaning of all line endings between your working directory and the git repository, automatically changing from one form to the other during checkout and commit. As far as I’m concerned the first two options could be combined into a checkbox named “break all of my text files.”

After you install msysgit, if you followed the same road I went down where you had used “run as administrator” on the exe, the resulting installation will be confused about it’s home directory. You’ll need to go to the Control Panel -> System -> Advanced system settings -> Advanced -> Environment Variables… dialog, and remove HOME from the System variables. If you don’t remove that the git would attempt to use the administrator’s home directory for settings, which will be denied access.

In order to communicate with GitHub you’ll need an ssh key associated with your local machine. Run Git GUI, select Help -> Show SSH Key, and click Generate Key. I’ve seen the recommendation you should leave the passphrase blank for git purposes.

So! Copy this key to clipboard, log on to GitHub, and on the account page click add another public key and paste it in. Now you can clone the public Spark repos locally, or fork it on GitHub and clone your own copy locally.

Next comes the Windows SDK for Windows Server 2008 and .NET Framework 3.5 a 1.3gb iso.

At this point there’s only one file missing, C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets, and a copy of that can be moved into place from the spark\bin\MSBuild folder.

The build.cmd can now be run and it produces all of the normal outputs in the build folder. That’s all you need if you’re interested in compiling Spark from source. The next step will be to get the build-distribution.cmd to run which also includes compiling the Spark VS integration package and it’s installer.

To be able to develop on this machine also, and eventually for the VS SDK, this will require the Visual Studio 2008 Professional Edition (90-day Trial). Again this iso is downloaded on the host o/s and mounted as a CD in Virtual PC.

While that was installing, downloaded the Microsoft Visual Studio 2008 Service Pack 1 (iso). Okay, I tell a lie, I had a copy already. But I did locate that url to verify the version of the file I had was correct.

Of course I still think it’s too bad they decided to recompose the graphic art on the VS2k8 install after beta2… But I digress.

Building the Spark VS integration package also requires Visual Studio 2008 SDK 1.1.

At this point the only thing left to install is the Windows Installer XML (WiX) toolset, but it’s the only build-related tool that’s not executed from it’s source-controlled binary representation. Other tools like NAnt and NUnit are all ready-to-run after checkout. I think I’ll embed that tool as long as I’m looking at it. Aaaaand… Works great! So if you’re following along at home you don’t need to install that last link.

And that looks like it! I’ve just used build-distribution.cmd to cook up some some Spark RC2 bits to test for posting on CodePlex, and if someone else finds the above useful so much the better.