Multiple Projects With The Same Source Files

HamQuest runs on the windows desktop and in the browser in silverlight.

When I went about making the silverlight version, I naively thought that I could just add references to my C# assemblies, compile and write a new client.

No.

I needed silverlight class libraries, not the usual sort for the winforms client.

Not too big of a deal. I made new projects, copied the files over, put them into the new project, and built them.

Well, there had to be a few tweaks in order to get them to compile for silverlight. Nothing too bad, but it caused a diversion in the code.

Then I started adding things to the silverlight version, so there was more code drift between the versions.

Still not a big deal, I pulled out WinMerge and set them both aright.

The main issue is that visual studio (and I’m using both VC# 2008 and Web Developer 2008, both Express versions) likes to manage the folder structure within a project. If you add an existing item, it copies it to where it thinks it should go.

Which is fine, until I’m targeting two different platforms with two different project times with the same source code. It doesn’t provide me a way to do it, at least not with Express.

So I did play around a bit with solution and project files, and I will be able to trick both tools into thinking it is the big dog and yet use the same code base. There will be a some overhead involved if I add new files or move them around, but not nearly as much as having to do a merge between directories.

I’m also going to try switching the desktop client to WPF, so that I can (hopefully) reuse the xaml from silverlight.

And I’m realizing again that the project is both at the “almost done” and “not even close to done” phases simultaneously.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: