Team Build Suddenly stopped working: System.NullReferenceException: Object reference not set to an instance of an object.

I'm using Team Build Beta 3 and have several team builds defined.  Everything was working fine but now I keep getting (both in the IDE and from Command line)

"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\TFSBuild.exe" start http://test-team:8080/ IQ "Messaging Service Install Build" /m:shaundev /b:c:\builds

Microsoft (R) TfsBuild Version 8.0.0.0

for Microsoft (R) Visual Studio 2005 Team System

Copyright (C) Microsoft Corporation 2004. All rights reserved.

 

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.TeamFoundation.Build.Common.CommonBuildTypeUtil.GetConfigDetailsList(String tfsName, String project, Boolean download)

at Microsoft.TeamFoundation.Build.Common.CommonBuildTypeUtil.VerifyAndGetBuildType(String server, String project, String buildtype)

at Microsoft.TeamFoundation.Build.CommandLine.CommandLineBuild.StartCommand()

at Microsoft.TeamFoundation.Build.CommandLine.CommandLineBuild.Main(String[] args)

Process completed with exit code -1073741819

Step 'Team Build Messaging' failed

I cannot build any of my team builds and I get the same error even for every newly created build

Please Help!

Thanks



Answer this question

Team Build Suddenly stopped working: System.NullReferenceException: Object reference not set to an instance of an object.

  • genocide77

    Has there been any change is permission for "Build Service" account   Can you ensure that the account running TFSBuildService.exe on build machine have all required permission especially permission to access Source Control.

    Thanks,
    Gautam

  • Hossam El-Deen

    Thank you VERY much for your reply!

    Here is what I did:

    1. I renamed the folder as you suggested to $<TeamProject>/TeamBuildTypesNew

    2. Checked in the rename

    3. Created a new build type with the wizard and it worked!!!

    4. I then tried adding my old build scripts to the newly created TeamBuildTypes Directory using Source Safe and it now works.. I will now move all of them over using sourcesafe.


    Regarding Locating the Issue:

    1. I have only used Beta 3.

    2.  I was able to see every build type in the team explorer and I was able to open them but as soon as I clicked the build button it would give me that Object Reference Not set to an instance of an object msg box.

    3. The only thing that I can remember doing is I had to nuke my local directory and then I did a get latest on all but I did not physically change the permissions in windows file explorer.

    Thank YOU SO MUCH!! I will respond back here if it happens again!

  • Eric Murphy

    It looks like there is some issue with getting the list of Build Types from the server. Can you first try the following workaround and then we'll try to dig down to the issue

    Workaround

    1. Rename the folder $/<TeamProject>/TeamBuildTypes to some other name
    2. Checkin the rename action
    3. Create a new Build Type using the wizard and then try building that newly created build type
    4. If this works then you'll be unblocked so that atleast newly created build types will work. After that directly using source control we'll add the pre-existing build types one by one and see if they work.

    Locating the issue

    To help locate the issue can you give me more information regarding the following

    1. Were all the build types created using the same version you are using right now, or are some of the Build Types created using some older bits like Beta2.
    2. Are you able to see the name of the Build Types in the Team Explorer under the Team Builds node
    3. Did you change the source control permissions on the TeamBuildTypes folder

     



  • Qi Sheng

    Great to know that you're unblocked.

    However, we have not seen anything like this before so I'd like to investigate further and try to figure out what went wrong.

    Can you please try the following....

    1. Verify that you have Temp environment variable defined. Check which folder it points to
    2. Create a folder ABC in the temp folder
    3. Create a file in ABC and ensure you can open, edit and save it back

    In the background we download the Build Types to the temp folder and the above step ensure that there were no permission issues with your account.

    Please send me an email at abhinab AT microsoft.com. In case the above steps goes through fine, I'll email you a small code snippet to run on your computer and that should be able to figure out the issue....



  • Team Build Suddenly stopped working: System.NullReferenceException: Object reference not set to an instance of an object.