Thanks for the responses.

I'm very embarassed to say that there was another problem in the .Net code which was causing the 'last good build' to be used (a message which I completely misunderstood) and therefore was trying to use a different SQL Server instance since the source code changes I had made were ignored.

Having corrected the other error it all works fine now.