How to convert a test project to a normal class library

Sometimes you make mistakes. One of the ones I make most often while using Visual Studio is creating a new project of the wrong type. Usually, creating using just the same one I usually created.

And just now, I added a unit test project to a project I was working on. Great, so that’s one job done. Now I needed to add the class library it was going to test – and added another unit test library. Doh!

Turns out this is fixable – simply edit the project file (the “Productivity Power Tools” extension provides a shortcut to this, if you don’t have it already) and remove the line:
then save and reload the project – which turns out to be easier than I thought.

Can’t claim I invented this trick – I found it the other way round on Adam Prescott‘s blog. But I’m putting it here because I know I’ll forget it, next time I need it.

Installing OS/2 Warp in a Virtual Machine

I’ve had OS/2 running in a virtual machine for years; specifically, a Virtual PC one. But I’ve always known that OS/2 has idiosyncracies, such that it won’t run in VMWare (although it’s getting better in VirtualBox).

By change I stumbled on the excellent site OS/2 Museum. The whole site is fascinating, and if you’re interested in the history of OS/2, or Windows, for that matter, it is a great read.

However the post that caught my eye (obviously) was Installing OS/2 in a virtual machine, which finally explained why it’s such a pain to get OS/2 going in a virtualiser.

Still, nice work – makes me want to dig out the zip file I saved it in and relive Warp 3 again, just for a while…

AJAX Control Toolkit – bug!

For reasons best not gone into (or at least, not if I want my readers to stay awake), I’ve been working a lot with Microsoft’s AJAX Control Toolkit for .Net recently. If you’re unfamiliar with the ACT, it’s basically a bunch of additional web controls for .Net that do calendars, modal popups… general sorts of nice stuff.

And then suddenly on one page, I noticed a problem.

I had a hidden field, which I was using to store the value I needed when the confirmation came back yes. Let’s say (for the sake of argument) that it was either “badgers” or “cheese“.

Well, it worked the first time it ran.

And then the second time, I picked “cheese” instead of “badgers” and I got back this:


Not. Happy.

After what felt like an aeon debugging the code, but was really only the time it takes between “Worthless Misery” and “Angel Of Agony“, I decided to debug the code.

Guess what? Turned out to be a bug in the ACT. PopupExtender controls don’t like being inside UpdatePanel controls. Who’da thunk it? What’s really amazing is that over the last 7 weeks, this is only the first time this issue has arisen.

Moral of the story, kids: keep your references up to date, and remember – it’s not always your code that’s at fault!

Convert Access 2007 forms to 97

You might be surprised by this, but you can still back convert Access 2007 forms, reports and modules to Access 97! (Why is another matter, of course, but let’s presume that you need to…)

OK, first of all, you need to export them to text, which is explained here in far more detail than I care to explain it.

So now, when you fire up Access 97, and try and convert them by running this line:

Application.LoadFromText acForm, "YourFormName", 

It fails, right? Well, you can easily change that by editing the text file itself…Read More »

How not to spam a blog…

Some spam is ridiculously easy to spot. So, if you’re thinking of spamming this – or any other blog, here are a few tips…

  • Your name is not “real sex lesbians”. In fact, nobody’s name is “real sex lesbians”. I don’t even have to research this on Google to know it.
  • Your name is also not the name of your site, with all the words spelled properly and with spaces between them.
  • Don’t post six comments, two minutes apart, under different names, on different posts, using the same comment text and the same website address. Even if you have tried a different name.
  • Changing numbers for letters – spelling it “v1agra” or “c1al1s” doesn’t work. The last person it actually fooled then went on to paint an elaborately crafted angel until the bell rang for Vespers and got a clip round the ear from Abbot Knorfric, who reminded him that this is the 12th Century and we’re far too intelligent to fall for that old gag any more…
  • Speaking of which, I do not want or need a bigger “P3N15”, nor do I believe pills bought over the Internet would achieve it even if I did. And I’m not sure you’re a real doctor, either, now that I think about it…
  • If even your domain name isn’t suitable for children, but my blog is. Well, you do the math.
  • iPod or Zune? Good question. Just not remotely what I’ve discussed on any post on my blog, ever. Still, nice try…
  • You may not be able to add my blog in your RSS reader. But the four links to various “discount” shops for well known brands make me suspicious (“Louise Vuitton”? “Uggg Boots”? Pleeease…)

Well, I hope that’s made a few of you laugh. What we bloggers and webmasters have to put up with, eh?

Night night…