Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Thursday, March 29, 2012

TFS 2010 Build - Not enough storage is available to complete this operation

If you see the below error while building your projects on the build agents:
Not enough storage is available to complete this operation

The reason could be that the build agent machine is running out of memory.
Increasing the RAM on the build agnet machine should fix the issue. 

Friday, March 23, 2012

TF215097: An error occurred while initializing a build for build definition xxx: There is not enough space on the disk.

If you see the below error:

TF215097: An error occurred while initializing a build for build definition xxx: There is not enough space on the disk.
 
Please follow the below steps:

  • Go to Start->Programs->Microsoft Team Foundation Server 2010->Team Foundation Administration Console
  • Select a build agent and click Properties
  • Change the working directory from to $(SystemDrive) to D:, E: etc depending upon the free disk drive

 

Monday, March 19, 2012

TFS 2010 Gated Checkin - TF14098: Access Denied: User xxx needs Checkin, CheckinOther permission(s)

If you have enabled Gated Checkin on your souce tree, you would have seen the following properties in the build alert email:
  • Checked in on behalf of
  • Checked in by
The value for "Checked in by" is the account under which the build agent is running. The value for "Checked in on behalf of" is the user who actually checked in the changes which triggered the Gated Checkin.

If you recieve this below error during gated checkin:
TF14098: Access Denied: User xxx needs Checkin, CheckinOther permission(s) for $/TeamProject/xxx/abc.cs.

The reason is that the build agent account doesn't have permission on your source tree to checkin other user's changes

Wednesday, February 22, 2012

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

While trying to build unit test projects, you might have seen this error intermittently
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.

To fix this issue, you should look at the warnings which you get while building this project. Even though they are not errors, these warnings could be the cause of intermittent failure. So try to fix the warnings and this should resolve the issue.

If this does not work, another fix is described at http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/bb0a1752-f6ce-4001-8b45-5aa72f1909e3

These steps need to followed:
  • Open the build definition
  • Go to Process tab
  • Select Logging Verbosity as Detailed

Tuesday, August 23, 2011

TFS 2010 - The process cannot access the file 'data.coverage' because it is being used by another process

Have you came across a situation where your build is running indefinitely and when you see stop the build, the following error is thrown:

The process cannot access the file 'data.coverage' because it is being used by another process.

This happens only when code coverage is enabled in the testsettings being used in the build. Also, you will see this issue if one of your unit tests is having an issue. To know about the root cause of the issue with the unit test, you can do the following:
  • Go to the build agent box
  • Browse to the directory where the build agent "Sources", "Binaries" and "Test Results" folder are present
  • Open the trx file in the "Test Results" folder
  • Click on "Test run error"
You will see the exact cause of the issue here.

Also, if you dont want to Stop the build forcefully and allow it to finish the execution, please follow these steps:
  • Go to the build agent box
  • Go to Task Manager and kill the process "VSPerfMon.exe"
This will allow the build to complete gracefully but you will not see any unit test and code coverage results.

Tuesday, March 8, 2011

TFS 2010 Build: Keep folder tree structure

There are two approaches :
=============================================
Approach 1
=============================================

To keep the output structure, you have to make TFSBuildHost not pass OutDir
to MSBuild and  custom the output path of each project.
  1. Open the build process file, navigate to Compile the Project Sequence, edit the property of Run MSBuild for Project Activity.
    • Set OutDir to empty (just make the textbox is empty)
    • set CommandLineArguments to String.Format("/p:SkipInvalidConfigurations=true {0} /p:TeamBuildOutDir=""{1}""", MSBuildArguments, outputDirectory)
  2. Modify each project file in the solution.
    • Check out project file to Edit.
    • Open project file  with notepad.
    • Find <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    • Use following code to replace the default OutputPath Property.
                   <OutputPath Condition=" '$(TeamBuildOutDir)'=='' ">bin\release\</OutputPath>
                   <OutputPath Condition=" '$(TeamBuildOUtDir)'!='' ">$(TeamBuildOutDir)\<ProjectName>\</OutputPath>
                  The word “Release|AnyCPU” is dependent on the value of “ConfigrationToBuild”  in   TFSBuild.proj.      
    • Save project file and check in.
=============================================
Approach 2
=============================================
  1. Open the build process file, navigate to Compile the Project Sequence, edit the property of Run MSBuild for Project Activity.
  2. Set OutDir to empty (just make the textbox is empty)
  3. Set OutDir to System.IO.Path.Combine(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(localProject))
  4. In the build definition, instead of specifying a single solution, specify the projects individually