Tuesday, 27 October 2009

TFS 2010 Beta 2 unit testing automated builds

I’ve been setting up Team Foundation System 2010 Beta 2 at work over the past couple of days. First starting off with doing it on a virtual machine locally to do some testing, but then deploying it into the virtual server environment we’ll be using it in for every day development.

I was initially very impressed by the ease of setup of the system. Talking to people and ready some blogs about setting up previous versions of TFS it was a complete pain with caused serious issues with server setup, permissions etc. TFS 2010 is soooo simple in comparison. Microsoft have thought about this side of things a lot and made setting it up very simple.

We went for the basic setup as we don’t need a lot of power or more than source control, automated builds and work item tracking.

Anyway, setup of the machine was fine and enabling communication between the tfs server and my laptop running Visual Studio 2008 sp1 was fine (just needing to make sure that Team Explorer is installed, followed by running the VS SP1 setup again, then the forward compatibility patch) and the first solution of code was checked in. A small utility dll project and associated unit test project. As the plan is to use this utility in all future development, a “tool kit” as you would, it made sense that this should be setup to have an automated build. It would also enable me to learn how to setup automated builds.

Enter first issue, no reference issues relating to “Microsoft.VisualStudio.QualityTools.UnitTestFramwork.dll”. Due to this issue the test project could not build as it had references to a namespace it couldn’t find.

C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

To resolve this initially I installed the C# components of Visual Studio 2010 Beta 2 on the server. I had originally just done the unit testing parts but this didn’t resolve the issue. The obvious issue with this is that we don’t want to have the full version (or any part of) Visual Studio installed on the server so I did this on a VM locally to see if resolved the issue … it didn’t :-(

Break through

After doing some more search on Google, I found this post from Grumpy Wookie about the location of the gacutil in the SDK, and another link (which I can’t seem to find in my history, sorry) relating to the fact that there aren’t the correct versions installed in the GAC on the server. So after checking the versions and seeing there weren’t any there …

I copied the following dll from my dev machine (with VS2008 on):



C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5

I then opened a cmd prompt on the server and navigated to where the SDK resides and ran the following cmd:

C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin>gacutil.exe /i "C:\Program File
s (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.Visua

This loaded version 9 of the UnitTestFramework into the GAC. This allowed for the automated build to run and to run the unit tests in my solution. Only issue now is the fact that it seems to be running with v10 MSBuild/MSTest with the v9 unit test assemblies and because of that it doesn’t like the one test which is using the ExpectedExceptionAttribute. At the moment I can live without this test being run on the server … but roll on march when the full version of TFS/VS 2010 come out and I can upgrade my development environment.

Hope this helps.

Visual Studio 2008 + IIS 7 development

At my new job part of my role is to bring most of the current website development in house for the 8 websites we currently have. Due to this I have decided to instead of just run them on the built in development web server which ships with Visual Studio and launches when you hit f5 with an address something similar to http://localhost:58697/Website1 to setup individual websites in IIS to best replicate the production environment. This is possible as IIS 7 on Windows 7 allows multiple websites on the client OS.

To do this I did the following:

1. Create a new website in iis 7 manager console; setting the host name to <identifier>.localhost


2. Update the hosts file to point the local loop back ip address to know about this new host name. Open the hosts file found in C:\windows\system32\drivers\etc\ and add the following line:                         website1.localhost

3. Open the Visual Studio solution (as Administrator) with the website in and navigate to the property page of the website. Navigate to Start Options > Server > Use custom server and set the Base Url to http://website1.localhost


4. Hit f5 in Visual Studio and run it.

I hope this helps anyone looking to do a similar thing.

Enjoy :-)

Saturday, 24 October 2009

Health, Life and beer – Update

It’s has been a very long time since I last posted with regards to anything, so I hope you have read my latest “geek” post about Windows 7 on the eve of its full release to the public. From reading a couple of tweets from various people I can see that if it was pre ordered it has already arrived in some cases … so enjoy!

Well there has been a lot going on since my last post, so I’m going to give you a quick “run across the roof tops” to use a project management phrase :-)

July ‘09

First wedding anniversary, doesn’t time fly! Lau and I went to Barcelona for the weekend and did the tourist thing. Saw all the important sites. Walked around the outside of the Gran Familia (defo spelt wrongly) and the Gaudi style constructions. Went past the Nou Camp which is an impressive sized stadium!

August ‘09

Found out that I would be to take part in a consultation period at work to potentially be made redundant. This was a bit of a shock to the system to be honest. On initially being told I thought I’d be ok, but when we had a more detailed discussion it was made clear that, unless something big happened, that I’d probably be going at the end of the process.

Also, went to Beaminster to play disc golf and Lau and I went to Bulgaria for our proper summer holiday :-)

September ‘09

Played in the Croydon Cyclone disc golf event which was awesome. Avery Jenkins (Current Open World Champion), Val Jenkins (Current Open Women World Champion) and Nate Doss (2 x Open World Champion) came over from the Euros on the way back to the US, via London to play in the event. I had the pleasure of playing my first round in the same group as Avery. It was awesome to watch someone with that much talent for the sport play, it was also good fun with the banter between us all.

Unfortunately, I also found out I’d be leaving my employment in October as my role would be redundant. This was a bit of a kick in the teeth. Both due to the fact that I had put a lot of time and effort into my job for the past 2 years 9 months, but also as I wouldn’t get to see my all my friends which I had made every day. This was the biggest rubbish point!

October ‘09

Bit of an up and down month so far, obviously the down was the leaving my employment in Reading and nearly all contact with Reading. This is the first time in over 7 years which I haven’t had very regular visits. This in itself was a little sad. On the upside we had a pretty good send off, drank quite a bit, danced a lot … it was good!

On the upside, I have started my new job based in Warwick. Obviously this is a lot closer for me than Reading. It does however mean that I need to drive to work now, although toying with the idea of cycling in the summer (when I’m a bit fitter). Been here a week and so far so good, everyone is really nice. Yesterday I finished the first bit of development work to be used in the building and demo’d it. I’ve also started going to the gym for a run/workout a couple of mornings a week. This will help me loose weight, get fitter and recover from the shoulder damage ready for disc golf practice ready for next year.

As for beers and exercise I’ve kept a rough log of what has been going on, so this is now the updated “goings on” with the first thousand beer “challenge” (see below).

Also since August I have been kinda doing Weight Watchers with Lau (who is a member). As we both could do with loosing some weight and we are both very competitive, this has obviously turned into a competition which I was winning until we went on holiday and my redundancy etc. but now less than a pound behind, I will catch up!!

Current weight loss (since Aug) : 9 7/8lbs

Current Status : Bad!
Beers: 386
Miles: 97.3 (gym: 64.3; road: 33)
DG Rounds: 62
Gym visits: 70
Lengths : 51 (total: 512)
Good => Exercise > Beers
Level => Exercise == Beers
Bad => Exercise < Beers

Wednesday, 21 October 2009

Windows 7 used in anger

I’ve been using Windows 7 from the RC now on my Mac Mini for a couple of weeks. I’ve got all the usually required applications installed; Firefox, Visual Studio etc. and have been relatively impressed by the experience.

On starting my new job last week I was given a pretty powerful Dell Vostro 1720. Its hasn’t got the highest of build quality, but it is packed fully of goodies including 2.6Ghz duel core cpu, 8gb ram, 512mb dedicated graphics card with a 1920 x 1200 resolution 17inch screen which is very crisp.

Anyway, I digress … at work I’ve got an MSDN subscription which allowed be to download the released version of Windows 7 64-bit and install it. I’ve now been using it close on a week and it feels like forever. The user experience is good and it feels very natural to go to from Windows XP. I had used Vista a couple of times before and just hated it with a passion. It was just slow and clunky.

I know the user experience including the speed is down to the components in the machine, but it runs in RC on my Mac Mini at home pretty comfortably and that doesn’t have much power or ram. I’ve also seen people running it on netbooks, something you wouldn’t even think about doing with Vista. Due to being pretty impressed so far with the OS I thought I’d put together a top n things I like about Windows 7. It would also give me the opportunity to look back on it in a few months time and see if I’m still impressed by it and if its still the same things which are good.

Top 4 “likes” about Windows 7

1. Speed  - The general speed of it is good. Quick recovery from hibernation, good reboot speed, general usage gives good response time.

2. Taskbar organisation – I love the way the task bar is organised. The pinning of applications to it, keeping all the icons together, being able to drag and drop them into which ever order you like is brilliant.

3. Multiple Monitor support – Brings an all new meaning to ‘plug ‘n’ play’ support. Plug in your second monitor for the first time, configure it correctly (location, resolution etc.) and thats it; done! Un plug it, take your laptop home, come back in, plug the monitor back in and it auto recognises it, goes back to the previous setup. No pushing laptop function buttons and waiting for the screen to refresh!

4. Window docking – There are little applications out there to automatically set the active window to half the screen, move it left and right etc. but the built in window docking in Windows 7 does for me. The high screen real estate which I’ve not got makes putting applications half screen usable … just drag them over to the side of the screen you want and *poof* automatically half the screen. My only niggle about this functionality is that when you’ve got 2 monitors it acts like a single screen so you can’t dock left and right on both screens which is a bit of a short fall, but other than that all good!