June 2010 - Posts

Speaking at the BCS this week on Agile
Mon, Jun 28 2010 16:12

Just a reminder I am speaking at the West Yorkshire BCS meeting this Wednesday on the subject ‘Agile is so old hat all the cool kids are doing lean now’.

The meeting starts a 5:45 for refreshments, and 6:30 for my session. The venue is the Old Broadcasting House, 148 Woodhouse Lane, Leeds LS2 9EN (www.ntileeds.co.uk)

Hope to see you there

Professional Scrum Developer with TFS course in the UK
Fri, Jun 25 2010 10:16

My fellow UK ALM MVP, Martin Hinshelwood, is running a Professional Scrum Developer course in London at the end of next month. I understand there are still some places left, and some good discounts available. So if you was looking at wanting to implement a Scrum process on TFS it could be well worth a look

If you want to know more about the whole PSD programme have a look at the Microsoft site

by But it works on my PC!
Filed under: ,
TF246062: Two or more database are in conflict when upgrading to TFS 2010
Fri, Jun 25 2010 5:21

Whist upgrading a TFS2010 Beta2 server to RTM I saw the following error when I ran the verify step of the upgrade.

TF246062: Two or more databases are in conflict because they are each designated as the owners of the following schema: Framework. The schema is for the host with the following name and ID: CollectionName, 8aace481-2471-49c8-da74-77ee3da4ce29. The databases with this conflict are: Data Source=SQLInstance1;Initial Catalog=Tfs_CollectionName;Integrated Security=True, Data Source=SQLInstance1;Initial Catalog=Tfs_Production_CollectionName;Integrated Security=True. You must specify one and only one database owner for the schema in the searchable SQL Server instances for this deployment of Team Foundation Server.

This error is caused because you have two Team Project Collection (TPC) DBs with the same unique GUID. So how can this happen and where do these GUIDs come from?.

When you create a TPC it gets a GUID. It keeps this GUID if you disconnect it from a TFS server and move it to another server. The only time this GUID can change is if you clone the TPC. When the cloned TPC DB is attached, the TFS spots it is a clone of a TPC is already hosts and issues a new GUID.

So how did I get two DBs with the same GUID? The answer is that prior to the upgrade some tests had been done using another TFS server to see if the client wished to do an in-place upgrade or disaster recovery style one onto new hardware. When doing a DR style upgrade the server does not issue a new GUID, as the TPC is unique to the new server, this server knows nothing of the original TFS server. This meant, as the two server shared a SQL cluster, that we had two copies of the same DB (but with different names) on the same SQL instance, so when the TFS upgrade program asked for the DBs by GUID it got back two DBs, hence the error.

The fix was to delete the Db created during the previous tests.

Note: You can see a similar effect if for any reason you replicate any of the TFS Dbs on a single SQL instance, such as to make a second copy of the warehouse DB for some special reporting purpose.

IDD Building a breakfast comment to a become process – now there is a leap
Sun, Jun 20 2010 2:48

Gil at Typemock has been posting about some ideas we discussed over breakfast at the Typemock Partner conference a while ago, I have been a bit slow at commenting, so I though I better add to the conversation. Though Typemock is an excellent mocking framework, for me basic mocking is not its biggest win. All the ‘classic auto mocking’ of interfaces to speed TDD style working is great, but I can do that with any of the .NET mocking frameworks. All they do is mean I don’t have to write my own test stubs and mocks, so saving me time, which is good but not the keep win I was looking for.

For me there is another way to save much more time and that is to reduce my ‘build, deploy, use’ cycle. In the land of SharePoint this is a significant time saving, or at least has been for us. It has meant that I can replace the build, create WSP, deploy WSP, let SharePoint/IIS restart and then view a web part, with a build and view in ASP.NET page that uses Typemock to fake out all to SharePoint calls. This is what Gil has termed Isolation Driven Development (IDD) Now isn’t a three letter _DD name going a bit far, I am even not sure there enough in it for me to write a book!

That said this is a solid technique which can be applied to any complex environment where developers or testers need a means to mock out significant, costly, or just slow components to ease there daily work process, often enabling some manual testing process, thus making them more productive. If you read the TPS books it mentions a lot how workers should optimise their work space to reduce wasted time the spend moving between machines or roles, this is just such a move.

So if you want to use the technique for Sharepoint have a look at my post, I hope it will save you time whether on SP2007 or 2010, or maybe apply same technique to other technologies.

Post NDC2010 thoughts – a great event
Sun, Jun 20 2010 2:33

What a great event the Norwegian Developers conference is. It is a nice size so there is a good selection of tracks, but no so big you feel lost, also the speakers and attendees were all mixing freely which I think always makes for a good atmosphere. This was all enhanced by the excellent organisation of the event, what can I say the wifi worked faultlessly, the food was good and the overflow screens (so from one place you could view the video and audio of any current sessions) was a brilliant idea, so much I know some people took to using this in preference to going to the actual session. You can see the overflow screens at the top of the photo below.

IMAG0258

On the subject of food it was good to have a breakfast, a ‘lunch bite’ and then another small meal around 4pm just when you are flagging. It was noticeable that the sponsors on the expo had basically got rid of all the swag and replaced it with a selection of snacks and coffee machines. For me far more acceptable to get a nice ice cream or a hot dog rather than yet another USB pen drive or fluffy toy with a corporate logo on it. I even enjoyed the band at the ‘legendary NDC party’, the organisers seemed to get all points right.

Also what was nice was that this was not a single vendor conference e.g. a TechEd or PDC. Now these can (but not always) be great for new product knowledge, but they can constrain the subject matter. At NDC there has been a good wide range of subjects with a particular strong Agile process and Ruby tracks. I for one would want to go to conferences to be exposed to things I have not used before, both technologies and concepts. This I feel you can for better at a conference with a wider scope of subject matter than a vendor conference. Now the danger is that the range becomes too wide and dilutes the content, but at NDC again I think they got it about right

Remember all the sessions at NDC were videoed in HD, and they are being rapidly being uploaded to http://streaming.ndc2010.no/tcs/, so if you are interested in seeing my or any other sessions from this ‘amazing line-up!’ take a look.

IMAG0253

I hope any sessions I submit for NDC2011 in May next year get accepted, I would love to go back.

When roving what I hate most about windows mobile 6 is not knowing what connection it will try to use.
Thu, Jun 17 2010 4:50

When travelling aboard what I hate most about Windows Mobile 6 is that I have no idea if the phone is going to trying to use a local WiFi or 3G. Mobile Outlook seems the worst culprit, it loves 3G over everything else!.

On mobile 6.5 there are just too many places where you might need set which data connection to use. This means, for fear if a nightmare phone bill, I tend not use us my phone for data. And just just don’t realise how much you use it at home until you are away.

I hope the connection management is more straightforward on version 7

All set for Olso – Off to NDC 2010
Tue, Jun 15 2010 8:43

I have sorted all the bits for my presentations so am ready for my trip to NDC 2010 in Olso tomorrow. Really looking forward to it, the agenda looks great.

Video of my Microsoft Techdays session on Lab Management
Fri, Jun 11 2010 10:15

I had not checked the site for a while, but my Microsoft Techdays session on Lab Management is now available as a video

I cannt make it embed here, some Community Server issue I assume, so look for it on the developer track on the second day. It is called 'Putting some testing in your TFS build process"

How little do you have to do to run a VS/TFS2008 build on a TFS2010 server?
Thu, Jun 10 2010 12:10

As do many people I have a good number of TFS2008 style builds for legacy applications. I will, in the end, move these over to VS2010 and hence upgrade their build formats to the new 2010 workflow based one, but for now it would be nice to be able to run them with the minimum of effort. To this end I have done some work to see the minimum I can get away with to allow these builds to run, the aim being to leave the build box as close to a virgin TFS2010 one as possible.

Basic Setup
My basic build system was

  • Windows Server 2008 32bit with SP2
  • TFS 2010 build

A VS2010 Test
Just to make sure all was OK, I created a basic VS2010 MVC2 project with it’s default tests. I then create a default build for this. This failed as my build machine did not have the targets to build a web application. I copied the directory

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications

up from a development PC to the build box and tried again. The build still failed as it was missing MVC2 assemblies, I downloaded the AspNetMVC2_VS2008.exe installer to get these assemblies on my build box. Once this was all done the build worked and the tests passed

A VS2008 Test
So I knew I had a 2010 build system that could build and test a 2010 solution. I next took an existing VS2008 solution’s build, this build had been upgraded as part of the TFS2008->2010 server upgrade. The build failed completely. This was not surprising as as well as being for a different version of VS I knew that was missing a number of custom build tasks.

First I had to install all the custom tasks, for me this was

Once all these imports were present the build tried to compile, and failed with the error.

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(133,11): error MSB4064: The "Retries" parameter is not supported by the "Copy" task. Verify the parameter exists on the task, and it is a settable public instance property.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(131,5): error MSB4063: The "Copy" task could not be initialized with its input parameters.  [c:\builds\Moorcroft Website\Debt Collection

I spent a lot of time fiddling here, if I replaced my

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets

with one form my PCs V9.0 directory all was OK, but then I found this post that sugested to just removed the offending parameters in the targets file, they are just retry and timouts! Once I did this the build attempted to compile the solution (and I checked it still worked for my VS2010 MVC2 solution).

I now got another set of missing assemblies errors. This was due to the lack of MVC1 on the build box, this was downloaded and installed

So now my MVC1 web site built, but the associated test project failed. This was because the V9 of Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll could not be found, the build box had V10. To address this I changed the assembly reference in the test project from the GAC to a copy of the assembly I included under source control, so it could be pulled to the build server.

Everything now built. However the tests did not run. There was an error that MStest could not be found. I edited the tfsbuild.proj to add the path to the MSTest file

PropertyGroup>
    <!-- TEST ARGUMENTS
     If the RunTest property is set to true, then particular tests within a
     metadata file or test container may be specified here.  This is
     equivalent to the /test switch on mstest.exe.

     <TestNames>BVT;HighPriority</TestNames>
    -->
    <TestToolsTaskToolPath>C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE</TestToolsTaskToolPath>
  </PropertyGroup>

If I looked at the build log I could see that MSTest now ran, and I could see all my 100+ test, but they all failed and were not published to the TFS server. I copied the .TRX results file local from the build box and opened it in VS2010. I could then see that all the test failed because the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll could not be seen. I am not sure it is great solution but I just dropped a copy into the same directory as MSTest.exe C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE. The other option I could think of would be to put it in the GAC.

Once this was done most of the test executed and passed Ok, but some still did not. Again checking the .TRX file, as it still did not publish the results, was due to problems with TestContext. It seems the V9 assembly passes TestContext parameters in a different way to the V10 one. The test that passed did not have any TestContext declared. So as I did not need TestContext for these tests I just commented them out.

All my test now ran, past, and the results were publish. The problem was if a test failed the results were not published, but this seems to be a know issue so nothing I can do about that now.

So I now have build that mostly work, probably well enough for now. I have not need to install VS2008 or VS2010 on the build box which is nice. Just have to see how well the build holds up in production.

TF31002: Altering the URL that your TFS 2010 Web Client uses to talk to the AT
Wed, Jun 9 2010 5:34

The Web Client for TFS 2010 (what was called Team System Web Access TSWA) is now installed as a core part of the Application Tier. It is no longer a separate install as it was in previous versions. This means it is easy to implement, it is just there by default. However, this can raise some problems if intend to expose to TFS AT via a firewall to the Internet, or use an alias for your TFS AT. This is because, by default, the Web Client uses it’s host server name as the AT name to connect to, it assumes the AT is local.

So for example, if you install your AT on SERVER1 you can set the server so that it responds to calls to the name TFS.DOMAIN.COM (after suitable DNS registration and disabling of local loopback checks on the server). So all your TFS clients should be able to access the server via http://tfs.domain.com:8080/tfs. However if a user tried to access the sever via Web Client URL of http://tfs.domain.com:8080/tfs/web they will get an error that that the inferred local AT (http://server1:8080/tfs) cannot be resolved (from where they are outside the firewall.

image

TF31002: Unable to connect to this Team Foundation Server: https://server1/tfs. Team Foundation Server Url: https://server1/tfs. Possible reasons for failure include: - The name, port number, or protocol for the Team Foundation Server is incorrect. - The Team Foundation Server is offline. - The password has expired or is incorrect. Technical information (for administrator): The request failed with HTTP status 404: Not Found.

This is easily addressed edit the C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Access\Web\web.config file and explicitly name the AT to be used for the web client. This is in the block

<tfServers>
     <!-- <add name="
http://server:8080" /> -->
</tfServers>

Note here the sample URL is wrong, when you are done it should look something like

<tfServers>  
  <add name=
http://server1:8080/tfs /> -
</tfServers>

Interestingly this fixes the issue on the screen shot above for the lower instance of the error, but not, the upper one. However that is enough to get you into the client and you don’t see the error after that.

Thoughts on the BCS EGM
Sun, Jun 6 2010 15:54

I got the paperwork for the British Computer Society EGM this week. This EGA raises some interesting issues, the best overview of the issue I have found seems to be on the Computer Weekly site.

So has supporters of the EGM motion argument, led by former BCS trustee Len Keighley, any merit? Yes, it does. Enough to vote out the current BCS management and trustees? Well I am not so sure.

I was a student member of the BCS in the late 80s, when I was working for a small PC and LAN dealership. It was not good experience, I left the BCS with a feeling they did not care for anything bar old mainframe style IT and had no interest in anything newer than the late 70’s.

I rejoined the BCS in the late 90s when I formed Black Marble. This was initially purely as a means to gain my CEng to help in getting more work. I was able to do this due to the number of years experience I had by then. However, I still had to provide references, a very detailed CV and attend a rather daunting panel interview.

At this time also started to attend my local branch, West Yorkshire, and I am happy to say that I found it a far more relevant and friendly organisation. I remember attending a local meeting soon after David Clarke became the BCS CEO, he was touring the branches to introduce himself, and being impressed by his forward looking views and plans for the society, which he seems to acted upon.

So has it all gone too far?

Well I am not too impressed by the CITP qualification, it strikes me as far to easy to get. I thought my CEng application process was fairly light compare the process required for friends who gained CEng via the IEE or who work in other chartered engineering professions such as structural or mechanical engineering.

We all know that qualification can become devalued, there has been no end of these in the realm of IT vendor qualifications such MCP, CNE etc. The vendors regularly force re-qualification (and often with serious re-banding to a new qualification) with greatly increased difficulty; a tactic that cannot be used for ‘pass once hold for life’ qualifications such as a CEng. For CITP I think it arrived devalued. At this time I see little for no respect for the CITP inside the industry or recognition in the world beyond. It certainly does not rank even vaguely equivalent to a ‘real’ CEng. It look like a tool, as said by the EGM supports, to drive membership alone.

Also I am not a fan of the BCS flagship product SFIAPlus, this for me became a huge barrier to completing my CPD record. I used to find it funny the CPD process for the BCS was fill out a Word document online, print out out and post it in. I welcomed the move to the online SFIA model, until I had to use it. It seems again designed for the large company 70s BCS core membership, a nightmare of complexity. It has reached the point I cannot be bothered to complete it, it would take far too much of my valuable time. So it must be said that as I don’t complete it now, there is a chance it has changed (maybe even improved) since I last tried it.

All this said I think the BCS is far more relevant now than it was 10 years ago, though I don’t whole heartedly welcome the move to offering business services, I can see the reason behind it. However I think the changes are still far from moving the BCS into the same space as other professional societies such as the Royal societies and BMA, which must be the long term goal.

So how will I vote at the EGM, like many I am still undecided. As I said the ideas behind the EGM have merit, but an EGM seems a poor way to address the questions, but maybe this is the only way to do it if the current management is a closed as Len Keighley makes out.

Hanging Humax PVT9200T PVR
Sat, Jun 5 2010 15:46

Recently my Humax PVT9200T has started to hang. When I started it up, within a minute or two (usually much less) the picture froze. Prior to this it had been working fine for the six months I had owned it. This seems to be a common problem for the PVT9200T of late, there is much talk of a patch on the way.

For me the immediate solution seems to have been simpler; I just reset it to factory defaults and let it rescan the channels. It has now been working find for a couple of days. Maybe this simple solution will help other owner of the PVT9200T

Can you mock out .NET extension methods with Typemock? – the answer is yes
Sat, Jun 5 2010 14:54

In Kevin Jones’ session at today’s DDD South West on ‘Testing ASP.NET MVC Applications’ the question was asked it it was possible to mock out .NET extension methods using any mocking frameworks. Kevin said did not think it could be done with Rhino Mocks, but thought it might be possible with Typemock.

Given my experience with Typemock I could see no reason why you would not be able to fake an extension method with Typemock, though I had never had need to do it. A quick search when I got home provided this post by Dennis van der Stelt which explains how to do it. t is just as easy as you would expect.

 

 

TF50609 error when creating a new team project in TFS 2010
Fri, Jun 4 2010 6:23

After upgrading a TFS 2010 RC server (which was previously upgraded from Beta1 to Beta2) to RTM I hit a problem when trying to create a new team project. The error I saw was

Event Description: TF30162: Task "GroupCreation1" from Group "Groups" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: TF50609: Unable to retrieve information for action ADMINISTER_TEST_ENVIRONMENTS, it does not exist.

A quick search shows this is a known problem with TFS 2010 Beta 1 to Beta 2 upgrades, strange it did not show itself on our servers until we when to RTM. Grant Holiday provides the solution for Beta 1 to Beta 2, but the command line required for RTM is slightly different to the one he had to use. The fix involves using both the parts of this post, the TF50660 is a symptom of the underling TF237091 error

  • Make sure you have exported a good working process template from another TPC
  • Delete all the old (Beta 2 process templates) from problem TPC
  • ALSO delete the new RTM process templates, in my case MSF Agile V5 (if you don’t do this and then reload the template the witadmin edit seems to have no effect)
  • Run the witadmin command (note no /P: option that Grant mentions and it is dimension not dim at the end)

witadmin chnagefield /collection:http://myserver:8080/tfs/myprojectcollection /n:Microsoft.VSTS.TCM.AutomationStatus /reportingtype:dimension

  • Import the known good process template (if you had tried to do this before the witadmin edit you would have got the error ‘TF237091: Actual reporting settings for the field Microsoft.VSTS.TCM.AutomationStatus are different from those specified in the XML. Changing these settings is prohibited.’
  • You should now be able to create new team projects
  • You need to repeat this for each TPC you have that shows the problem
TF261007 error message when attaching a collection
Thu, Jun 3 2010 4:22

Whist moving Team Project Collections (TPC) from our old TFS2010 Beta/RC server to new production hardware I got a TF261007, exactly as detailed in Marcel de Vries post. However, I was in the better position than he was as I still had full access to my original server, so I thought I could go back, re-attached the TPC on the old server, run the command

tfsconfig lab /delete /collectionName:MyCollection /External

re-detach and all would be OK.

This was not the case, you still get the same problem as TF261007. It seems that if you have a TPC what has ever been on a TFS 2010 RC server with Lab Management configured then it can only be moved to a new server that also has Lab management configured, or at least SCOM VMM console installed and pointed at VMM Host.

I checked this with Microsoft and was told it is a known issue with the Lab Management RC and will be fixed in the RTM, for now there is no other workaround other than the one Marcel detailed.