October 2008 - Posts

PDC Day 3
Thu, Oct 30 2008 10:33

The keynote today was all about MSR, interesting as ever. I particularly liked the demos of Second Light (Surface computing that reaches beyond the surface of the physical pc) and Boku (a system to help children program). The latter is close to our hearts at Black Marble due to the work we have done on FPL, another system to teach children to program (watch out for free downloads of this application soon)

It was also interesting to see that there was a date for a PDC 2009 – shows that Microsoft have plenty of new things in the pipeline.

Outside of the keynote, what could be more directly useful to me will be Visual Studio Team Lab, a new SKU for 2010 (sorry still can’t find a link with more details) that will manage the provisioning of test environments: Hyper-v VHDs are stored in a repository and created using pre defined rules as part of a build process. Test can then be run either automatically or manually using the new VS2010 test tools. Test results are then fed back into the TFS work item tracking system including screen shots, error test information – in fact enough information to allow a developer to connect to the Hyper-v pc at the point of error and debug. This idea is something we are working on internally with current VS2008 and Hyper-V tools. Unfortunately we are unlikely to see Team Lab until VS2010 reaches beta, so a good way off – so I am going to have to persist with our own internal projects it seems.

PDC 2008 Day 2 Keynote
Tue, Oct 28 2008 14:47

Well it was all end user focused today; Windows 7 and experience in Live systems. All looks very nice, given the usually question you have to raise in a connected environment over personal data security. I am sure Microsoft have done a good job of physical and logical data security, but the whole concept of mesh networks opens up a huge potential for social attacks. No developer can protect against the user clicking on an ill advised email or now mesh link; I know I have fixed too many friends PCs with the XP Antivirus 2008 Trojan of late, where they click on a link because an email said their anti virus was out of date, they thought they were doing good.

It was interesting that the major third party demo’s big demo’s were both from the UK: Tesco and the BBC. Is it me or does the fact Tesco plan to offer a WPF application to handle your online orders but also manages family photos see a little scary? Where is there reach going to end?

The second half of the keynote was the Don Box and Chris Anderson show  - excellent as ever. A whistle stop tour of programming against Azure. And all the demo’s coded against the live web sites even worked!.

PDC Buzzword bingo
Tue, Oct 28 2008 14:36

It has been a while but I knew a conference would turn up some good buzzwords

Meshify – to add Live mesh functions to a site

It made me laugh…
Tue, Oct 28 2008 11:30

At the PDC expo drinks last night I was asked to show age ID to get a drink! Just me it seems, nobody else from the company.

I thought I was doing well to be carded on my 30th birthday whilst in the US, but 10 years on it getting silly – You must ask how do I keep my youthfully countenance? Wish I knew, but they say it is youth culture here in LA.

So my new aim is to get asked to prove my age to get a drink with an OAP bus pass.

VSTS 2010 at the PDC
Mon, Oct 27 2008 19:59

Though not really mentioned in the keynote there are a lot of sessions on VSTS 2010 at the PDC; it is going to be a major really major release.

Chatting in between the sessions with other delegates there seems to loads of interest in the new testing features, but we know this is pain point from Alt.net meetings. It will be interesting to see how these new tools deliver, I am sure the manual testing tools will be useful, but I am a bit more doubtful over the UI testing tools. We have all seen the demo promise of these products before and hit problems when we try to use them for real.

I think the improved integration for Office is also going to be important. At the moment we use the eScrum template for VSTS and the main reasons for this are the easy project visibility it gives to non-developer users via it’s web site and the way it manages the relationship between the product backlog and sprint tasks (given the lack of hieratical work items in the current VSTS). With 2010 I am not sure we are going to need the eScrum web site. The ease of reporting (and live work item updating) in Excel and hieratical work items will make this it superfluous, so the basic Agile template in 2010 may will be able to do the job.  

PDC 2008 thoughts day 1
Mon, Oct 27 2008 17:59

So it seems we are going to have themed days at the 2008 PDC and day one is all about  the Azure services platform. Though judging by the expo stands the key announcements for tomorrow - Oslo and Dublin are out there too. As conferences go it seems a bit confused to me, I guess Microsoft are aiming for three big bangs at three keynotes; but we seem to have had a big bang today and splutter of future items.

However, I might be wrong, there could be stuff we have not even suspected, lets wait and see what we get tomorrow. Don Box and Chris Anderson are usually good value whenever they present so I await their keynote session with anticipation!

So as to Azure, a new move for Microsoft? Well not really it seems the logical next step especially given the offerings of Amazon and Google. It will be interesting how this develops, but on a first quick look Azure seems a very strong offering, I guess it will all be down to price in the end. Oh and if you trust Microsoft to host your business data.

All life is here
Mon, Oct 27 2008 13:05

I won’t repeat Robert’s blog entry on the Black Marble founders reunion, but just to add the missing photo

image

TF53010 & TF213000 unable to load
Fri, Oct 24 2008 5:16

I got this error when installing TFS 2008. In the error log I could see the problem was when the TfsGssInit.exe  was run, it said

Detailed Message: TF213000: A required user account could not be added during installation or repair of Team Foundation Server.  The installation or repair failed with the following exception message: System.TypeInitializationException…..

I found the answer in the TFS forum. The thread (and others) did suggest there were DNS lookup issues, but the thing that got it for me was removing VS2008 Team Client (and it’s SP1) from the server. I had installed these whilst I had been waiting for the IT department do some work in the SQL Data Tier. I thought I was saving times, I was wrong!.

I think the issue was the VS2008 SP1, but I removed both and the install of TFS worked OK.

TF220050 error in TFS install
Fri, Oct 24 2008 5:16

Whilst doing a new TFS 2008 dual tier install I was getting a failure with a TF220050 error when I entered the data tier DB instance name. The setup wizard just said ‘failed to connect to data tier’, but you can find the actual error number in the install logs to be found under C:\Documents and Settings\[setup user]\Local Settings\Temp

This error seems to be just a generic low level ‘cannot connect to the DB’; in my case it was caused by one of two issues:

  • The SQL server I was pointing at was a SQL 2000 not SQL 2005 (I had been given the wrong server name) – the moral is always check the version yourself.
  • Also analysis services was not running on the SQL  2000 box.

So I am not sure which is the actual cause of the error message here, version or missing OLAP service In my case the fix was to just connection to the correct SQL 2005 instance.

... and I understand DDD7 is now full
Wed, Oct 22 2008 13:40
So that took about 6 hours by my estimation. Popular or what!
DDD7 Registration is open
Wed, Oct 22 2008 5:22

Ian Cooper has just announced that you can now register for DDD7, but be quick it is expected to be full in 24 hours.

TFS Iterations not appearing in IterationPath
Thu, Oct 16 2008 7:35

I have been working on site that has had to do a disaster recovery of their TFS application tier (AT) due to hardware failure. For a short period they have had to use a spare PC as their AT. Due to the hast required to get the developers working this AT was only configured to for source control and work item editing.

So I was onsite to put the proper replacement AT in place. All seemed to go OK until we added a new Iteration to a team project. It did not appear in the IterationPath field for work items.

This problem actually manifested itself for us in the inability to add a new sprint from inside eScrum. Unlike most team process templates the eScrum front end creates sprints by creating an iterations and an associated work item (to hold extra information) all in one go. This was failing as after the iteration was created it’s creation was not propagated to allow a work item to be associated with it.

After checking the ATs event log we saw TF53010 and TF51338 errors. I then ran the TFS Best Practice Analyser (BPA) and this showed two issues:

  • the MyDomain\TFSService account not being in the TFS [Server]\Service Accounts group. I think this was due to fact that the temporary AT system had used using different accounts and the installation of the new AT had left some behind.
  • due to this the TFS Scheduler was not running reliably, this would explain why the new iterations were not being propagated.

We fixed this using the tfssecurity /g command to add the MyDomain\TFSService  account to the TFS [Server]\Service Accounts group and then restarted the server.

Once this was done we checked the configuration was right using the BPA again, and finally checked we could create sprints in eScrum.

TFS 2008 SP1 resets service accounts
Thu, Oct 16 2008 7:23

I installed the TFS 2008 SP1 on a site that was using custom accounts for the identities that run the application pools for the WSS instance and Report Services.

These user accounts got reset back to Network Service when the service pack was installed; I had not see this occur on any site I had upgraded previously. This meant you could not start WSS or Reporting Services.

Manually resetting them back to their old correct accounts fixed the problem.

Using StyleCop in TFS Team Build
Wed, Oct 15 2008 17:19

The recent release of the MSBuild Extensions includes a task for StyleCop 4.3. I have been trying to get this integrated into our TFS TeamBuild, I think it is a far more preferable way to do it than editing the various project files in our solution to link in StyleCop as you had to do in 4.2.

There are a good few steps I had to follow to get it doing:

  • Install the StyleCop 4.3 Msi
  • Install the MSBuild Extensions Msi
  • Now we have to do some fixed/changes. First copy the MSBuild.ExtensionPack.StyleCop.dll from the C:\Program Files\MSBuild\ExtensionPack to C:\Program Files\MSBuild\Microsoft\StyleCop\v4.3. We need to do this as the StyleCop DLLs are not automagically found (you could fix this using a search path I suppose)
  • Next we need to modify the C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks file to fix a typo that is a known issue. The StyleCop line at the end of the file should read
  • <UsingTask AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\StyleCop\v4.3\MSBuild.ExtensionPack.StyleCop.dll" TaskName="MSBuild.ExtensionPack.CodeQuality.StyleCop"/>

  • Now edit your Team Build tfsbuild.proj file; import the extension tasks
  • <PropertyGroup>
      <TPath>C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks</TPath>
      <TPath Condition="Exists('C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks')">C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>

  • Now you need to edit or add the AfterCompile target, something like as shown below. I have added comments for each block.

<Target Name="AfterCompile">
   <!-- Create a collection of files to scan -->
  <CreateItem Include="c:\MsBuild\MySolution\MyProject\**\*.cs">
    <Output TaskParameter="Include" ItemName="StyleCopFiles"/>
  </CreateItem>

   <!-- Run the StyleCop MSBuild task using the setting file in the same directory as sln file and also stored in TFS -->
  <MSBuild.ExtensionPack.CodeQuality.StyleCop
      TaskAction="Scan"
      SourceFiles="@(StyleCopFiles)"
      ShowOutput="true"
      ForceFullAnalysis="true"
      CacheResults="false"
      logFile="$(DropLocation)\$(BuildNumber)\StyleCopLog.txt"
      SettingsFile="c:\MsBuild\MySolution\Settings.StyleCop"
      ContinueOnError="false">
    <Output TaskParameter="Succeeded" PropertyName="AllPassed"/>
    <Output TaskParameter="ViolationCount" PropertyName="Violations"/>
    <Output TaskParameter="FailedFiles" ItemName="Failures"/>
  </MSBuild.ExtensionPack.CodeQuality.StyleCop>

<!—Log the summary of the results -->
<Message Text="StyleCop Succeeded: $(AllPassed), Violations: $(Violations)"/>

  <!-- FailedFile format is:
      <ItemGroup>
          <FailedFile Include="filename">
              <CheckId>SA Rule Number</CheckId>
              <RuleDescription>Rule Description</RuleDescription>
              <RuleName>Rule Name</RuleName>
              <LineNumber>Line the violation appears on</LineNumber>
              <Message>SA violation message</Message>
          </FailedFile>
      </ItemGroup>—>

<!-- Log the details of any violations -->
<Warning Text="%(Failures.Identity) - Failed on Line %(Failures.LineNumber). %(Failures.CheckId): %(Failures.Message)"/>

<!-- The StyleCop task does not throw an error if the analysis failed, 
so we need to check the return value and if we choose to treat errors as warnings 
we need to set the error state, if set it will cause us to jump to the failure target -->
  <Error Text="StyleCop analysis warnings occured" Condition="'$(AllPassed)' == 'False'"  />

  <!-- List out the issues, we only need this if we are not forcing the error above, as if we have we never get here -->
  <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
          BuildUri="$(BuildUri)"
          Message="%(Failures.Identity) - Failed on Line %(Failures.LineNumber). %(Failures.CheckId): %(Failures.Message)"/>

  <!—Complete the stylecop step, we get here if we have no thrown an error  -->
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
                BuildUri="$(BuildUri)"
                Id="$(StyleCopStep)"
                Status="Succeeded"
                Message="StyleCop Succeeded: $(AllPassed), Violations: $(Violations)"/>

  <!-- If an error has been raised we need to call the failure target
       You might have thought you could get the same effect as the error line a few lines above by adding a condition to the OnError as shown commented out below. However this does not work as the OnError condition is not evaluated unless an error has previously occured in a task, the condition clause is secondary-->
  <OnError ExecuteTargets="FailTheBuild" />
  <!--<OnError ExecuteTargets="FailTheBuild" Condition="'$(AllPassed)' == 'False'"  />-->

</Target>

<Target Name="FailTheBuild">
  <!-- We are failing the build due to stylecop issues -->
  <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
          BuildUri="$(BuildUri)"
          Id="$(StyleCopStep)"
          Status="Failed"
          Message="StyleCop Failed: $(AllPassed), Violations: $(Violations) [See $(DropLocation)\$(BuildNumber)\StyleCopLog.txt]"/>

  <!-- List out the issues-->
  <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
          BuildUri="$(BuildUri)"
          Message="%(Failures.Identity) - Failed on Line %(Failures.LineNumber). %(Failures.CheckId): %(Failures.Message)"/>

</Target>

 

So this will run StyleCop as a separate build step and you have the option to fail the build or not depending on your view of StyleCop violations by commenting out one line. Either way violations will be listed as rows in the list of build steps.

I had really wanted to get the number of violations added to either the total errors or warnings as listed in the Results Details at the end of the build, also I had wanted a simple way to access the StyleCopLog.txt created in the drops directory. However, I have not worked out how this final step yet. If I manage to work it out I will blog on the solution – or if you know to do please post a comment.

DDD7 Agenda Published
Mon, Oct 13 2008 17:15

Well the votes are in and my proposed session for DDD7 on automated testing did not make the cut, but thanks to anyone who voted for it. I can’t say I am surprised that I am not on the list given the larger number of very interesting sessions proposed.

However, I am a little disappointed that even though there were a good percentage of the proposed sessions on testing related subjects only Ian’s on TDD and  Ben’s on Pex made it through; I really had expected to see Gojko’s on Fitnesse.Net on the list.

Given that much of the last Alt.Net conference was focused on acceptance testing the relative lack of testing related sessions surprised me. There seems to be a difference in interests between the DDD voting community and the Alt.Net attendees. Does this mean that the average person attending (or at least voting) for DDD sessions does not care about testing or thinks they have nothing to learn? or have I missed something about the nature of the two events?

Like the new Blog theme?
Thu, Oct 9 2008 15:29

Lauren has has restyled our blog server to match the new company web site and also done a matching blog template.

Do you like it?

XP Club meeting
Wed, Oct 8 2008 13:50

An excellent turnout for tonights XP Club meeting. As I write Nick McKenna is talking about his experiences in adopting agile processes.

Flash problems
Tue, Oct 7 2008 7:29

Are you seeing the error "Cannot play media. You do not have the correct version of the flash player. Download the correct version" on the BBC web site or on YouTube  "Hello, you either have JavaScript turned off or an old version of Macromedia's Flash Player. Get the latest Flash player"?

I have been on my Dell Mini; I suspect the problem was the upgrade route I took from XP-Home -> IE8 Beta ->XP Prof meant the registry was a mess. Repeated re-installation of Flash and Shockwave had no effect.

After much fiddling I fixed it by downgrading to IE7, running the Abode Uninstaller, the installing Flash and upgrading to IE8 again. However I suspect I did not need the IE downgrade first, but I had done this previously.

Hope this saves yo some time.

Running fitness.Net tests in unit test – some tips
Sat, Oct 4 2008 16:39

I posted a while ago on wiring in Fitness.Net into a unit test framework using HTML files to hold the tests. Well I have been using the technique for some workflow acceptance testing and hit a couple of gotta’s that are easy to forget:

  • Make sure the HTML files containing the user story tests are set to copy to the project output directory in the IDE – if they are not then the framework cannot find the tests, so obviously none are run. The danger is you think the problem is an incorrect class or method name, when it is a simple missing file problem.
  • If you edit the user story HTML file make sure you rebuild the solution. If you don’t do this the copy to the output directory might not be triggered as a simple build maybe skipped as the IDE will not see any changes to source files it needs to compile the project. This is especially easy to forget if you are using a test add-in such as Testdriven.net as opposed to clicking on build yourself.
  • Be careful with the HTML editor you use to create user story file in case it reformats the page. This is important for parameters (but it seems not for the method name fields). You need to make they are formatted

               <td>My Value</td>

  • as opposed to

               <td>
               My Value
               </td>

    as the latter will include the carriage returns characters in the parameters passed into the test so will probably fail.

I think that is all for now, I will post any others I find as they crop up

Upcoming events in October
Sat, Oct 4 2008 10:54

It is getting to that conference time of year again; I can’t believe the PDC is only 3 weeks away, then VBug  the next week and DDD7 just after that.

A bit closer to home there are some free events coming up this month:

Look forward to seeing you at one of the events in Yorkshire

A bit further from home, Guy has had a bit of a coup at the Bristol .Net Usergroup. He has got Oren Eini the developer of RhinoMocks speaking on the 13th of October during a rare UK visit. For those of you who the name Oren is not familiar, he is the man behind blog http://ayende.com/blog/ a major resource for all things Agile.

More Posts Next page »