i have creating a console application which takes the two argument one as input .xml file and give output as .htm file
below is code for the accessing tfs
TfsTeamProjectCollection teamProjectCollection =
TfsTeamProjectCollectionFactory.GetTeamProjectCollection
(new Uri("http://myServer:8080/tfs/defaultcollection"));
var buildService = (IBuildServer)teamProjectCollection.GetService(
typeof(IBuildServer));
IBuildDefinition myBuildDefination = buildService.GetBuildDefinition(
"MyProjectName", "MyBuildDefinationName");
Uri lastKnownGoodBuild = myBuildDefination.LastGoodBuildUri;
IBuildDetail myBuildDetail = buildService.GetBuild(lastKnownGoodBuild);
string dropLocation = myBuildDetail.DropLocation;
but above doesnt seem to be working for me...so i thought to manually pass the path. as you can see in below code snippet
// i have just added blackslash at the start and my problem solved
string xmlfile = "\\\\myTfsPath\\CodeMetricsResult.xml";
if (File.Exists(xmlfile))
{
//do something
}
but for some reason...it always go to my else block.
please let me what i am doing wrong
note....the tfs path is on network and i have all the access to it.
thanks,