Fix project build order in VS and MD.

See #226. 

But note the lack of my horrible upstream merge commits. :smile: