Thursday, August 12, 2010

Mixing TFS 2008 and VS 2010

At work, we’re in the early phases of migrating our TFS 2008 setup to TFS 2010. However, since some teams have already started work on the new hotness that is VS 2010 and .NET 4, there was a need for us to get their automated builds up and running immediately. We “requisitioned” a desktop that was already running builds for another semi-defunct project using CruiseControl.NET, and installed Team Build on it.

It took a few tweaks to get the code compiling, but something was wrong with the testing phase – the tests would run, but the test runner would then report a failure, resulting in a yellow warning lights rather than nice green success lights. The error message was:

MSBUILD : warning MSB6003: The specified task executable "MSTest.exe" could not be run. The system cannot find the file specified [D:\Source\CommonPlatform\Common Platform Development CI Build\BuildType\TFSBuild.proj]

So the tests all passed, but then Team Build couldn’t find the testrunner that it had just used! We tracked down another user with the same complaint on StackOverflow, but they were shouting in the dark, with no response to their question.

After much head-scratching alternated with banging our heads against the wall and wondering why Microsoft products are sometimes to great and sometimes so plain awful (often in the space of just five minutes), we eventually found the solution to our problem tucked away in forum on MSDN. The TeamBuild targets file which imports the TestToolsTask has an invalid path reference:

<UsingTask TaskName="TestToolsTask" AssemblyFile="$(MSTestRefPath)\Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll" 
Condition="'$(ProjectFileVersion)' == '2'" />

since MSTestRefPath doesn’t appear to be defined in VS 2010. By changing it to the correct path, the test runner can be found again, and the error disappeared.

Quite why Microsoft implemented it so that the tests would run but then fail afterwards I don’t know, but at least our builds are all happy, and the developers are happy. Hopefully we can now get back to migrating TFS 2008 to 2010, and we can see the back of this problem.

Wednesday, May 12, 2010

Synchronicity

Apple and Adobe seem to be having a bit of a dummy spit over Flash at the moment, which is polarising the developer community. Well, I opened up Google Reader to read Richard Banks’s latest thoughts on the subject, and as I do that, bam! Safari crashes with a Flash error.

Flash Irony

(the Flash app was running in a different tab, not as part of Google Reader).

Wednesday, May 05, 2010

Baseless suggestion

I’ve been spending the past few days cleaning up a messy situation at work, where one of our source control branches in TFS 2008 has not been properly merged back into trunk for several months. In trying to tidy things up, I kept getting the following error:

TF14087: Cannot undelete '$/MyCareer/Trunk/build/NightlyBuild/TFSBuild.rsp' because not all of the deletion is being undeleted.

The problem was that the folder NightlyBuild had been renamed in both the source and destination branch, but there was still a reference to it in this old changeset. Using tf merge /discard reported that there were no changes to make, which left me stuck for a bit, until one quick application of Google-fu, and I found the solution to my problem. By performing a baseless merge, the offending file is accepted:

tf merge /discard /baseless /version:C13494~C13494 $/MyCareer/Branches/Maintenance $/MyCareer
/Trunk /recursive
Resolved D:\Source\MyCareer\Trunk\build\DailyBuild\TFSBuild.rsp as AcceptYours

Hope that helps!

Thursday, February 25, 2010

Lightroom and CS3

I recently upgraded my camera from an ageing Canon EOS 30D to the newly-released EOS 7D. Jumping from 8 megapixels to 18, and adding HD video recording, as well as niceties such as Auto ISO, are real plusses for me.

However, I soon found an annoying problem: I use Adobe Lightroom 2 to manage my rapidly-growing photo collection (just a handful shy of 10000 now) and Adobe Photoshop CS3 to do clever stuff like panorama stitching. However, CS3 doesn’t recognise the RAW format that Canon uses in the 7D, although Lightroom 2 does, so I can’t load photos taken with the 7D in Photoshop. Bummer.

Adobe’s ideal solution is that I upgrade to Photoshop CS4, which will be several hundred dollars. However, the solution I came across was to use Adobe’s own tools to work around the limitation. Lightroom can convert RAW images to its preferred DNG format, and that format can be opened in CS3. Usually I convert my RAW images to DNG as the last step in my development process, but this is a neat little workaround, saving me a big chunk of cash at the same time.