我正在嘗試編寫一個HelloWorld TFS插件。我創建了一個類庫項目。代碼是在這裏:TFS 2013插件沒有解僱
using Microsoft.TeamFoundation.Common;
using Microsoft.TeamFoundation.Framework.Server;
using Microsoft.TeamFoundation.VersionControl.Server;
using Microsoft.TeamFoundation.WorkItemTracking.Server;
using System;
using System.Diagnostics;
namespace TFSServerSideHandler
{
public class WorkItemChangedEventHandler : ISubscriber
{
EventLog appLog = new EventLog();
public string Name
{
get { return "WorkItemChangedEventHandler"; }
}
public SubscriberPriority Priority
{
get { return SubscriberPriority.High; }
}
public EventNotificationStatus ProcessEvent(
TeamFoundationRequestContext requestContext,
NotificationType notificationType,
object notificationEventArgs,
out int statusCode,
out string statusMessage,
out ExceptionPropertyCollection properties)
{
statusCode = 0;
properties = null;
statusMessage = String.Empty;
try
{
appLog.Source = "WorkItemChangedEventHandler";
appLog.WriteEntry("Handled event : " + notificationEventArgs.GetType().Name);
}
catch (Exception exception)
{
appLog.Source = "WorkItemChangedEventHandler";
appLog.WriteEntry("Couldn't Handle event : " + notificationEventArgs.GetType().Name + " Exception : " + exception.ToString());
}
return EventNotificationStatus.ActionPermitted;
}
public Type[] SubscribedTypes()
{
return new Type[] { typeof(WorkItemChangedEvent), typeof(CheckinNotification) };
}
}
}
我建立了項目,然後從\ TFSServerSideHandler部署中的所有文件\ BIN \調試到C:\ Program Files文件\微軟的Team Foundation Server 12.0 \應用層\ Web服務\ BIN \插件我的TFS服務器上的。
我正在使用最小安裝TFS 2013與更新5(12.0.40629.0(Tfs2013.Update5))。 當我將代碼簽入到此TFS服務器或更改工作項時,我應該看到日誌條目,但沒有看到我的代碼中有任何日誌條目。任何人都可以指出我在這裏錯過了什麼嗎?
我還安裝了Visual TFS服務器上的Studio遠程調試工具。我試圖將視覺工作室調試器附加到TFS服務器上的w3p.exe,但是從未觸發過中斷點,我們發生了檢入事件。 –