Remember Versioning Before Putting Fist Through Monitor

I am currently working on a project with a deadline in my day job, and I am having fun with it. Well, mostly. There was this little problem I was having that was beginning to make me quite frustrated. And you know that frustration occasionally results in a computer programmer putting his or her fist through the monitor display, right? Well, I guess that’s a favorite meme; nobody really does this, right? Gosh, I hope not. It wouldn’t be so dangerous these days, what with LED monitors and all, but in earlier ages when we had glass monitor screens we risked serious cuts and bruises.

I was trying to enforce some encapsulation by working with two different VS2012 solutions at the same time. Since I was planning to use a particular set of class libraries in multiple related projects, I wanted to make them into common components. No sense reinventing wheels. So here I was with the common component libraries in one solution and the application using those libraries in the other. The user application had references to the DLLs of the class library, and to the point, the references pointed to the Release folders of the class libraries. Since I was developing both pretty much at the some time (though the class libraries started life and got their major form prior to the user application), I would occasionally find I needed to go back to the class libraries to make tweaks and corrections. Then I would test the user application to see how well the changes worked. The user application was being neatly used as a test bed for the common libraries — meaning the next time I use them, which will be in a follow-on project this week, they will have been largely debugged. Two birds with one stone.

This worked out mostly OK, but I started noticing that sometimes my class library changes weren’t taking effect. I’d make changes, rebuild the libraries, and the changes wouldn’t take effect! But then again, sometimes they would! I was nearing the peak frustration level, with my dual monitors beginning to cringe in anticipation of the inevitable shattering blow from my Fist of Steel®, when suddenly it popped in there as to what was going on.

Aaarrrgggghhhh!

Here I was, rebuilding my libraries with the new changes, and failing to rebuild my user application! Of course the changes weren’t taking effect! The user application was never referring to the DLLs in the Release folders of the class libraries, it was referring to the copies of the DLLs it had placed in its own bin folder! And since I had not rebuilt the user application to pull the class libarary changes into the user application’s bin folver, OF COURSE it continued to use the old versions of the libaries.

In a certain sense I was creating my very own Hell. A versioning Hell. Complete with red-tinged, tailed demons wielding pitchforks. Jabbing me into a towering frustration! But realization is power, and so the demons are now banished to the nether regions. And all is now blue-sky with chirping birds again.

Gosh, I hope I remember this next time.

Advertisements
This entry was posted in Miscellaneous. Bookmark the permalink.

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