.sln question re:Farseer

Topics: Project Management Forum
Mar 29, 2011 at 4:51 PM


As anyone who has supported the three XNA platforms with the same codebase knows it can be a hassle to keep everything organized.. I'm thinking about restructuring my solutions/csprojs after my next project and I'm exploring options.

I've noticed the Farseer samples have parallel solutions for Windows/WP7/Xbox. I'm curious about a few project maintenance details with that approach. Specifically, when you add files to one csproj that is in one solution, do you have to manually add it to the others as well? Or is there some automated way to keep them in sync? Do you typically keep three instances of Visual Studio running at the same time? Are there any automated solution/csproj builders out there that might work for all this (ie CMake etc)?

Thanks for any feedback.

Mar 29, 2011 at 5:07 PM
Edited Mar 29, 2011 at 5:09 PM

Hey Eric, I haven't had any problems trying to support Xbox and WP7 so far.  Question, do you have 3 seperate projects for each platform?  Aside from player control issues, I usually make a WP7 project first, and then create a copy of that project for the Xbox within the same solution.  If you right click the game project in the solution explorer, you'll see you have the option to copy it for Xbox and PC.  Whenever I add new content, that should automatically be associated with the other platforms.

Mar 29, 2011 at 5:11 PM

In general I work on the windows project. We use links to files, so that changes happen in all 3 projects. If I add new files I have to add them manually to the other projects though. Most of the time I have another instance opened with the WP7 project to try out changes in the emulator. So nothing fancy here... I can only speak for myself though as Im pretty sure Ian has all kinds of dark automagic scripts to do his bidding and therefore more to say to the subject matter :)

Mar 29, 2011 at 5:48 PM

I currently have one solution with 3 csprojects per actual project. It adds up to be quite a few projects.. I keep most things in this one large solution and it's becoming a bit heavy for my tastes but on the other hand it solves a lot of maintenance issues by having just one solution. However, keeping project configurations in order is a real drag at this point especially when you consider the different builds (reach/hidef) and free/paid versions of apps.

For Moonlander (and in fact all my projects), the approximate number of projects is this:

(phone + xbox + windows) * (resource lib + common game lib + (various support libs * 4) + app specific exe + farseer). That's 24 projects to build one app on the 3 platforms (and this is approximate, a couple extras are needed for free/paid versions of the phone games as well as hidef content for the xbox/windows).

I've been thinking about manually editing the csproj files to do wildcard inclusions. I vaguely recall there being some way for csproj files to essentially #include other projects which would seem pretty ideal for sharing between the platforms, but I haven't yet been able to find what I think I'm remembering there. I suspect Visual Studio might not like that approach if it's even possible though.. I've had issues when using conditional stuff in .csproj files before and this would seem likely to have a similar behavior.