Wednesday, 18 June 2008

Silverlight Assault Course Announced

It's official the NxtGenUG Southampton Silverlight Assault Course date has been announced, find out more here. It's all going to be taking place on Saturday 26th July 2008 at the Immediacy premises in Poole, Dorset.

If you are interested in learning all about Silverlight 2.0 then this is the day for you, it will be packed full of short presentation sessions and plenty of hands on labs with some experts such as Richard Costall, Chris Hay and Mike Bonner all kicking about to lend a hand where necessary.

This event is going to be full of great content and off course there will be loads of pizza and swag to boot, so for a mere £40 this is an absolute steal, sign up now and don't miss out as spaces are limited.

Monday, 9 June 2008

Changing a Class Library Project to a Test Project

I was moving some unit tests between assemblies today so that we could isolate some smoke tests from the more scenario type watin tests and for some reason MS Test wasn't picking up the tests contained within my new assembly.

It then dawned on me I hadn't created a Test Project using  the File | New | Project wizard, I had created a Class Library instead. So I simply needed to change the project type of the new assembly, I searched high an low for a way to do this in VS2008 with no luck, if anyone can point me in the direction of doing this via the IDE I would be grateful.

image

Anyway, I changed the project type the old fashioned way by editing the XML, select the Edit Project File option from the context menu on an existing Test Project, in the XML look for something that looks like this :

<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>



Copy this, then go to your Class Library project select the Edit Project File option on the context menu and insert the project type guid xml section. Next just reload the projects back into VS2008 and you will have all of the unit tests from the Class Library assembly available to run.

Wednesday, 14 May 2008

MS Test Re-Enabling Ignored Tests

In our current development environment we use MS Test for our unit testing and one thing that has been bugging me for a while is that if you remove the Ignore attribute from a test method, recompile and then try and run the test nothing happens and but you get a message in the status bar saying "No tests were run because no tests are loaded or the selected tests are disabled".

So I didn't really understand what that meant and usually ended closing Visual Studio, re-opening it and seeing if that fixed the problem, it didn't so I finally googled it and came across this MSDN article, in which it nicely explains that after adding the IgnoreAttribute to the unit test "The test is disabled. In the Properties window, the Test Enabled property is automatically set to False."

Now what should happen is when you remove the IgnoreAttribute the Test Enabled property is automatically set to True. However this does not seem to the case so after removing the IgnoreAttribute you need to either:

1. Open the Test View, select the ignored test, press F4 to display the properties window and set the Test Enabled property to True.

image

Or

2. Open the Test List Editor, selected the ignored test, right click and select "Enable" from the context menu.

image

I hope this helps anyone with future MS Test issues.

Tuesday, 22 April 2008

Automatic Properties and Structs

I was merrily creating my first struct since the advent of automatic properties and figured it would be nice and easy, so continued and created the following:

public struct UserNamePasswordPair
{
public string UserName { get; set; }
public string Password { get; set; }

public UserNamePasswordPair(string userName, string password)
{
UserName = userName;
Password = password;
}
}



To my disappointment I got a compiler error:



"The 'this' object cannot be used before all of its fields are assigned to"



This was very disappointing and I thought surely Microsoft wouldn't have forgotten to allow automatic properties on structs and it turns out they haven't, looking further down the error list I see a useful message:



"Backing field for automatically implemented property 'UserNamePasswordPair.UserName' must be fully assigned before control is returned to the caller. Consider calling the default constructor from a constructor initializer."



Ah ha, fair enough, so I simply added the call to the default constructor and bobs you uncle it compiled, yeh!



public struct UserNamePasswordPair
{
public string UserName { get; set; }
public string Password { get; set; }

public UserNamePasswordPair(string userName, string password)
: this()
{
UserName = userName;
Password = password;
}
}

Silverlight Assault Course - Bournemouth

Us guys at NxtGenUG - Southampton have been putting our heads together to create a complete day of Silverlight, we figured the best way to learn all this new technology is to get your hands on it and play with it whilst in the presence of people that know and can help answer your questions.  The great thing for me is that this event will be based in Bournemouth which is my home town!

Keep your eye on the NxtGenUG event list for more details on the final date of this. We are thinking that the day will consist of a bunch of hands on labs that give you some typical walk through scenarios allowing you to understand how things happen in Silverlight. There will also be key speakers that will deliver talks on the different aspects of Silverlight and how they fit within the current development world.

This is still in the planning stages but we are looking to get this all together within the next couple of months, I was just wondering whether anybody has some suggestions on the kind of content you would like in an event like this, please feel free to add comments with your suggestions.

Cheers

DDD7 - Date Released

I've now been given the nod that the date for DDD7 has been officially released, it is going to be Saturday 22nd November 2008 although the website hasn't been updated yet.

Saturday, 19 April 2008

Cool desktop switcher application

After the recent arrival of my new son Jacob, the inevitable huge amount of photos have been taken and my library has started to grow and grow. Now, it has always bugged me that the Windows desktop background image is static and you have to manually change it to something different when you 'feel the need', well this is no longer the case.

A friend pointed me in the direction of this handy little piece of software called John's Background Switcher by a guy called John Conners. It's got functionality to hook up to all sorts of online photo albums such as Flickr, Picasa, Phanfare etc and its really easy to use. Just point it at the albums you want to include, choose the type of background image you want (I really like the snap shot which creates a bunch of random polaroid looking images).

image

The following images I stole from John's site, which I am sure he won't mind because I am promoting his application, but they give you a good example of what the application does.

Make your wallpaper interesting!With John’s Background Switcher!

Anyone enjoy!