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, February 7, 2012

MSTEST - How to get the ID of a test

Sometimes you will come across situations where you need to find the ID of a testcase.
A common scenario is if you see an errors like:
Error adding test case xxx to test run: There is no test with specified Id {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
The easiest way to find the ID of a testcase is to use either of these options:
Option 1
  • Run the desired test
  • Open the trx file in xml editor to view the ID of the test
 Option 2
  • Create a test list in the test list  editor
  • Add the desired test to the test list
  • Open the vsmdi file in xml editor to view the ID of the added test
 Option 3
  • Create an Ordered test
  • Add the desired test to the Ordered test
  • Open the Ordered test in xml editor to view the ID of the added test

 

Friday, January 6, 2012

Windows Azure - Access to the path 'ServiceDefinition.build.csdef' is denied.

If you receive this error:
Error 102 Unable to copy file "ServiceDefinition.csdef" to "ServiceDefinition.build.csdef". Access to the path 'ServiceDefinition.build.csdef' is denied. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.4\Microsoft.WindowsAzure.targets

The problem is that the file 'ServiceDefinition.build.csdef' is read-only. You will be able to find this file in your cloud project (.ccproj) directory. If you remove the read-only setting, the error will disappear and build and publish commands will work properly.

Could not establish trust relationship for the SSL/TLS secure channel

This is a common problem in the testing world where you deploy a service on a HTTPS endpoint by using a self-signed certificate.
When you try to send a request to this service using HTTPWebRequest/WebClient, you see the error:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The solution to this problem is to ignore the trust by using the following code:

using System.Net;
using System.Net.Security;

           
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.mysite.com");

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

Stream stream = response.GetResponseStream();

StreamReader sr = new StreamReader(stream);

string resp = sr.ReadToEnd();