Domanda

I'm doing experiment on TFS 2012 Lab Environments to setup BDT workflow.

When I setup standard environments and test BDT successfully on Lab Center, I try to setup a new environments with the existing VMs which has been used by existing environments.

So I have to delete the existing environments to release the VMs first. But after the deletion, the lab center is opened with the following exception:

Server was unable to process request. ---> There was an error generating the XML document. ---> Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

There is a same issue reported at here, but it has not been resolved.

Could you please give some suggestions?

È stato utile?

Soluzione

After experiments, the issue is resolved by following the suggestion in the post: The issue seems caused by the bug of TFS that it is not deleted the environments totally and some dirty data is left.

  • Connect to TFS db

  • Run the following sql to check the Env data:

Select le.LabEnvironmentId from LabEnvironment le where le.PartitionId = 1 And NOT EXISTS (Select * From LabSystem ls where ls.LabEnvironmentId = le.LabEnvironmentId AND ls.PartitionId = 1)

  • At last run the following sql to delete un-valid environments data:

Select le.LabEnvironmentId from LabEnvironment le where le.PartitionId = 1 And NOT EXISTS (Select * From LabSystem ls where ls.LabEnvironmentId = le.LabEnvironmentId AND ls.PartitionId = 1)

I have tested on my TFS Evn and it works.

Attention: before run the sql script, refine it carefully.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top