Applies ToTFS 2010 Service Pack 1 Visual Studio Ultimate 2010 Visual Studio Professional 2010 Visual Studio Premium 2010 Visual Studio Test Professional 2010

Symptoms

When you try to build a project in Microsoft Visual Studio Team Foundation Server (TFS) 2010, the build process fails, and you receive the following error message:

Exception Message: Arithmetic overflow error converting IDENTITY to data type int.Arithmetic overflow occurred. (type SqlException)

Additionally, an unhandled exception message that resembles the following is generated:

at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteReader() at Microsoft.TeamFoundation.Build.Server.BuildComponent.UpdateBuildInformation(String buildUri, IEnumerable`1 changes, String requestedBy) at Microsoft.TeamFoundation.Build.Server.TeamFoundationBuildService.UpdateBuildInformation(TeamFoundationRequestContext requestContext, IList`1 changes, IdentityDescriptor requestedFor) at Microsoft.TeamFoundation.Build.Server.BuildWebService.UpdateBuildInformation(InformationChangeRequest[] changes)

Note This issue typically occurs when large build logs are stored in the TFS build server database.

Cause

This issue occurs because the MSBuild logger adds nodes to the tbl_BuildInformation table during each build process. Therefore, the NodeId column reaches its maximum integer value.For example, if you run all your builds in Diagnostic or Detailed mode, a lot of messages are written to the database. This behavior causes the value to grow. Additionally, if you have activities that are writing out messages, these values can add up over time.When you run the following SQL statement against your collection database, the returned value is close to the maximum value of 2.147 billon:

Select IDENT_CURRENT('tbl_buildInformation')

Resolution

To resolve this issue, apply the following hotfix. This is a preventive hotfix. This hotfix does not resolve this issue if it has already occurred. We recommend that you contact Microsoft Customer Support Services if you encounter the issue. After you apply this hotfix, the LogProjectNodes and LogWarnings properties are added to MSBuild activities in TFS 2010.Note To set the new properties in MSBuild activities,you must apply this hotfix on the TFS build server and on the Microsoft Visual Studio clients that are used to edit the build workflow.

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio Team Foundation 2010 Service Pack 1 (SP1) installed.

Restart requirement

You have to restart the computer after you apply this hotfix if the affected files are being used during installation. We recommend that you close all instances of Visual Studio before you install this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

File name

File version

File size

Date

Time

Platform

Microsoft.teamfoundation.build.server.logger.dll

10.0.40219.413

49,280

8-Aug-12

14:55

x86

Microsoft.teamfoundation.build.workflow.dll

10.0.40219.413

660,616

8-Aug-12

14:55

x86

Tfsbuildservicehost.exe

10.0.40219.413

192,608

8-Aug-12

14:55

x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

To prevent this issue , use one of the following methods:

  • Open your build process template by using a text editor, add the LogProjectNodes and LogWarnings properties to the MSBuild activity, and then set the values of the properties to false.

  • Open your build process template by using the workflow designer in Visual Studio, browse to the MSBuild activity, and then change the values of the two properties to false.

Notes

  • There are two MSBuild activities in default build process template.

  • The default value of the two properties is true.

We recommend that you reduce the verbosity level for the builds if you are using the Detailed or Diagnostic level. Use these options only when it is required.In TFS2012, these messages are no longer written to the database. Instead, they are written to a file that will help this issue.For more information about how to maintain TFS build tables, go to the following Microsoft websites:

More information about the Build delete options General information about the Destroy command

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.