none
Occasional - Microsoft.TeamTest.targets(14,5): error : Object reference not set to an instance of an object.

    Question

  • We are currently experiencing problems where maybe one build in four will fail with an object reference not sent to an instance of an object.  Kicking this build off again will succeed!

    We are using TFS2010, Team Build.  We have only 1 build controller & agent.  The error from the build logfile is shown below:

    PrepareForBuild:
      Creating directory "obj\Release\".
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets(14,5): error : Object reference not set to an instance of an object. [D:\TFS Team Builds\BuildLocation\1\Website\Website CI Build\Sources\BusinessLibrary\Source\Unit Tests\UnitTests.csproj]
    Done Building Project "D:\TFS Team Builds\BuildLocation\1\Website\Website CI Build\Sources\BusinessLibrary\Source\Unit Tests\UnitTests.csproj" (default targets) -- FAILED.

    We have put up with this for a while now, but if someone can help us out with this that would be great.

    Thanks

    John

    Wednesday, November 24, 2010 2:44 PM

Answers

  • Hi Cathy,

    Thank you for following up on this.  Our builds have stopped failing in this way since I changed the logging to diagnostic mode.

    I did this to try and get more details, but now the errors have stopped, it is almost as if slowing the build down has made it more reliable.  It isn't really an option for us to keep it like this.

    I will keep monitoring the situation.

    Thanks

    John

    Monday, November 29, 2010 9:31 AM

All replies

  • Hi JCorker,

    In the build machine, you have a windows service called "Build Services", can you check the account is this service using to run? maybe the account doesn't have permissions in TFS, it's just an idea, as the error is so generic.

    There should be a little more information in the event log on the build machine.  Could you take a look and post the contents of the message?

    Hope it helps!

    Best Regards,

    Cathy

    Thursday, November 25, 2010 3:59 AM
    Moderator
  • Hi JCorker,

    Is your issue solved?

    Best Regards,

    Cathy

    Monday, November 29, 2010 4:02 AM
    Moderator
  • Hi Cathy,

    Thank you for following up on this.  Our builds have stopped failing in this way since I changed the logging to diagnostic mode.

    I did this to try and get more details, but now the errors have stopped, it is almost as if slowing the build down has made it more reliable.  It isn't really an option for us to keep it like this.

    I will keep monitoring the situation.

    Thanks

    John

    Monday, November 29, 2010 9:31 AM
  • Hi JCorker,

    Thank for your following up!

     


    Best regards,
    Cathy


    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, December 01, 2010 9:52 AM
    Moderator
  • Had this error today too. Is there any news why this is happening?

    The fix worked for me too (just tried to set logging to Normal and back to Detailed).

    Tuesday, January 31, 2012 4:16 PM
  • We couldn't find the reason for this but having rebuilt our test list (4,000+ tests) we don't seem to be getting this problem anymore.

    Thursday, March 15, 2012 10:16 AM
  • For what it is worth we are seeing the same problem in our setup.  However, we are using CruiseControl.NET and not TFS.  So far we have just forced another build to get around it, but it seems to get into a funk where it will fail this way server times in a row, and then not again for a week.

    Matt

    Monday, December 10, 2012 10:21 PM
  • I occassionally see this message as well.  We usually just re run the build and it works.  It would be great to understand why this occurs.

    Microsoft.TeamTest.targets(14,5): error : Object reference not set to an instance of an object. [D:\Builds\13\...\MMPPOIEP.UnitTests.csproj]


    -7

    Wednesday, January 23, 2013 6:29 PM
  • The same issue appeared suddenly for a build which has been running fine since months.

    I did also fixed it by setting the verbose level on "Detailed".

    Once a build succeeds with that level, I can set the level back to "Normal" and the following builds still succeed...

    It does not make sense to me, but who cares as long as it's unblocking my developers :)


    Valéry Letroye

    Tuesday, April 30, 2013 9:45 AM
  • We've also been having this problem for a few weeks.  I'll increase the logging level, but think this shouldn't be happening in the first place. 
    Friday, May 31, 2013 8:23 PM
  • Hello,

    we have the same issue.

    Setting the logging detail verbosity to detailed is an always working solution or is it just decrementing the chance that the error happens again?

    Are there other real fixes available now?

    Regards

    RB

    Thursday, June 13, 2013 8:01 AM
  • This worked for me:


    "I just opened that test project file and searched for

    <Shadow Include="Test References\

    And replaced with <None Include="Test References\
    and checked in the code.

    I got passed my next build and no BuildShadowTask  failure."

    Wednesday, March 12, 2014 3:49 AM