Tuesday, 10 November 2009

Windows 7 Aero snap shortcuts

I was browsing through my regular blog feeds this morning and the tweets which had happened over night this morning and I came across the following link. It’s posted in the context of Visual Studio 2010 Beta 2, however it works for any window which is currently selected.

As I use a duel screen setup at work and manually dragging/snapping the windows to the side of the screen only work at the far edges of the entire desktop real estate these short cuts enable halving both screens spot on.

The short cuts which are starting to be high up on my most used list are:

Dock to Screen Left : Windows + Left Arrow
Dock to Screen Right: Windows + Right Arrow

I’m lovin’ Windows 7!

Monday, 9 November 2009

Have people not heard how to use namespaces?!?!

I’m trying to work out how something works and it’s over mulitple dlls. This is fine in the grand scheme of things. They aren’t large dlls either and the names of them gave me hope that it would be well designed. One has the data access code, one with common code and one with the business rules. Three projects working together isn’t large at all. I’ve worked with Visual Studio solutions with almost 100 projects in, so how hard could this be … ?!

So far so good …

That was until I started looking at the names of the class definitions. This is the point when I wanted to bang my head on the desk!

In the data access dll, it has a data access namespace, yet all the class definitions are prefixed with ‘dal’.

Why?!

In the business rules dll, it has a business rules namespace, yet all the class definitions are prefixed with ‘br’.

No seriously, why?

And to top it all off, the data entities are in the the 3rd dll, all post fixed with ‘Data’ … this in itself isn’t bad, except the namespace is ‘Data’ so that kinda makes the post fix redundant.

And don’t get me started on the name of the dll … and no it doesn’t even have the word ‘data’ in it (see the opening paragraph ;-))

Why would you do that?!?!

*hithead*

I’m on Twitter!!

I’ve signed up to the revolution, you can follow me @WestDiscGolf.

What are you up to today? :-)

Wednesday, 4 November 2009

Visual Studio 2010 Beta 2 initial thoughts

Just thought I’d post a small brief entry about my initial thoughts of Visual Studio 2010 Beta 2. So far so good I like it, the layout is nice, the tooling improvements are good, the response speed of the IDE has improved quite a lot … however, I won’t be using it full time until there is a version of Resharper which works with it; I’m lost without the R# power!

:-)

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=9.0.0.0, 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):

Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

To

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
lStudio.QualityTools.UnitTestFramework.dll"

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.