Tuesday, August 24, 2010

TFS WorkItemChangedEvent... WHERE IS IT???

In TFS, I sometimes need to write a WorkItemChanged event handler. No biggy, plenty of examples on how to do that. But what's hard to find is what dll is the class Microsoft.TeamFoundation.WorkItemTracking.Server.WorkItemChangedEvent in? In TFS 2008 it was in Microsoft.teamfoundation.WorkitemTracing.Server.WorkItemChangedEvent. In TFS 2010 it is in Microsoft.TeamFoundation.WorkitemTracking.server.DataAccessLayer.Dll.

Thursday, August 12, 2010

Only option under File is New Team Project

This is the second time i ran into this problem. I installed some flavor of VS. All of a sudden, when I go to the File menue, there is no longer the option to create a new project. There is only the option to create new team projects. And yes, I didn't just have Team Explorer installed. In this case, I had vs 2010 ultimate installed. So wtf? Turns out, if you select the project management profile when you first start up VS, it won't allow you to create new projects. What doesn't make sense is that I selected c# profile. Still, the solution is the same as if i did select the project management profile. Reset VS with this comand line command:

devenv.exe /resetuserdata


Tuesday, July 13, 2010

TFS 2010 with Moss 2010 prompts to save for process guidance and all html pages

Was running into this problem. TFS 2010 with MOSS 2010. Whenever i browsed to the process guidance or any html pages in the portal, i would get a prompt to save dialog. Turns out, this is a change in MOSS and their default security settings.


in a nutshell, open sharepoint central admin, switch to web applications tab, then open general settings for the site you want to change, go to Browse File handling settings, change the setting from strict to permissive.


Monday, July 12, 2010

configuring moss 2010 with tfs sharepoint 2010

Took me forever to find a guide on how to configure sharepoint 2010 for tfs 2010. Try this:


Saturday, May 22, 2010

TFS 2010 event refresh rate

Out of the box, tfs 2010 batches events together and fires them every 2 minutes. To change this, you need to set the notification delay in the TF registry. Run this script using PowerShell. This will set the delay to 30 seconds. You can set it to zero to fire tfs events immediately.

[Reflection.Assembly]::Load("Microsoft.TeamFoundation.Client, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

# Modify the TFS configuration server URL as necessary.

$configServer = new-object Microsoft.TeamFoundation.Client.TfsConfigurationServer "http://localhost:8080/tfs/"

# Get the TF registry service.

$tfsRegService = $configServer.GetService([Microsoft.TeamFoundation.Framework.Client.ITeamFoundationRegistry])

# Set the notification delay to 30 seconds. All collections will use this delay unless they override this value in the collection hive.

$tfsRegService.SetValue("/Service/Integration/Settings/NotificationJobDelay", 30)

Friday, September 18, 2009

Debugging Visual Studio Integration Packages

Due to the nature of the company I work for, I've had to write a bunch of Visual Studio Integration Packages. So what's the easiest way to debug a VS Integration Package? Right click the project in the Solution Explorer and select Properties. This should bring up the Project configuration pane. Click the debug tab.

Start external program: \Common7\IDE\devenv.exe
Command line arguments: /ranu /rootsuffix Exp

I got sick of trying to google this every time I had to debug an integration package so here it is.

Tuesday, August 11, 2009

Create Team Project failure... and solution

I just created a fresh install of TFS 2010 beta on a vm, tested everything out using the user account I used to install TFS and everything worked fine. However, when I logged in with a different user account who was a TFS admin as well as a local admin on the tfs machine (my user account), I couldn't create a new team project. Checking the error log, it said my user didn't have the correct SharePoint rights to create a new site.

Since I'm not very knowledgeable with SharePoint (at all), I added myself as a SharePoint farm administrator and added myself as a collection administrator. When I went back and tried to create a team project, it failed again with the same error. Did I mention I'm totally clueless when it comes to SharePoint? Anyway after futilely messing around with SharePoint for a while, I realized that all the team projects were children of the Default Collection site. Therefore, I had to give the user rights in DefaultCollection site. So I browsed to http://sites/DefaultCollection/default.aspx, clicked the Site Actions button in the upper right hand corner of the page and selected Site Settings. This brought up the Site Settings page for the DefaultCollection site. Under users and Permissions I clicked People and Groups and added myself as a user with full control. Just in case, I also added myself as a Site collection administrator.

Going back to Team Explorer, I tried to create a new team project. This time, the creation process went further than before, but it again failed. The error log looked like this:

Module: WSS
Exception Type: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException
Exception Message: TF30063: You are not authorized to access http://:17012/_vti_bin/TeamFoundationIntegrationService.asmx.
Stack Trace:
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, String methodName, HttpWebResponse& response)
at Microsoft.TeamFoundation.Client.SharePoint.SharePointTeamFoundationIntegrationService.ActivateFeatureById(String siteUrl, Guid featureId)
at Microsoft.VisualStudio.TeamFoundation.WssSiteCreator.HandleFeatureActivation(WssCreationContextWrapper contextWrapper, XmlNode features)
-- Inner Exception --
Exception Type: System.Net.WebException
Exception Message: The remote server returned an error: (401) Unauthorized.
WebException: Response Status Code: Unauthorized
WebException: Response already disposed, no additional information available.
WebException: Status : ProtocolError
Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.AsyncWebRequest.ExecRequest(Object obj)
-- end Inner Exception --
--- end Exception entry ---

Apparently, I needed to add my user account to the web application policies. To do this, bring up the SharePoint Central Administration, go to the tab marked Application Management and click the link Policy for Web Application under Application Security. From here, add the users who will create team projects.

Problem solved.