2つの引数1を入力.xmlファイルとして受け取り、.htmファイルとして出力するコンソールアプリケーションを作成しています
以下は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;
しかし、上記は私にとってはうまくいかないようです...だから私は手動でパスを渡すことを考えました。以下のコードスニペットでわかるように
// i have just added blackslash at the start and my problem solved
string xmlfile = "\\\\myTfsPath\\CodeMetricsResult.xml";
if (File.Exists(xmlfile))
{
//do something
}
しかし、何らかの理由で...常に私のelseブロックに移動します。
私が間違っていることを教えてください
注....tfsパスはネットワーク上にあり、私はそれにすべてアクセスできます。
ありがとう、