2

I read these links on the official Microsoft page Update a customized process template to access new features :

When I try to execute Features4tfs.2015 in debug I get this exception System.NotSupportedException: Specified method is not supported. at Microsoft.TeamFoundation.Integration.Server.CommonStructureService.Microsoft.Tea‌​‌​mFoundation.Framework.Server.ITeamFoundationService.ServiceStart(TeamFoundation‌​Re‌​questContext systemRequestContext)

on this call

ProjectFeatureProvisioningService.GetFeatures(...).

Any idea?

Gabriel
  • 333
  • 2
  • 8
  • My first problem was finding the dll *Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.dll*, it was solved with the help of jessehouwing, see the answer below for more details. – Gabriel Aug 18 '15 at 19:45

2 Answers2

1

It seems to live here in v14:

public class ProjectFeatureProvisioningService : ITeamFoundationService, IProjectFeatureProvisioning

Name: Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProjectFeatureProvisioningService 
Assembly: Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common, Version=14.0.0.0 

Reflector is your friend in these cases. Just load all assemblies from the TFS server directories into Reflector and then use the search feature:

enter image description here

It'll then be a piece of cake to find the assembly "Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.dll" here:

  • C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\Web Services\bin
  • C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\TFSJobAgent\Plugins

These internal classes can move between assemblies without notification. That's why they're internal ;).

Full disclosure: I received a copy of Reflector Pro for my blogging and love for the product. There are other products like IlSpy, justDecompile or dotPeek which may offer similar functionality.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Thanks , I finally found the dll "Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.dll" on the TFS 2015 server at these locations : C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\Web Services\bin C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\TFSJobAgent\Plugins – Gabriel Aug 18 '15 at 17:26
  • If you get it to work, please contact me on @jessehouwing on twitter :). – jessehouwing Aug 18 '15 at 17:30
  • I get this exception Microsoft.TeamFoundation.Framework.Server.HostShutdownException on this line using (TeamFoundationRequestContext requestContext = deploymentServiceHost.CreateSystemContext(true)) – Gabriel Aug 18 '15 at 18:43
  • I can get past that exception by passing both the `/c: /w:` or the `/c: /d:` options with the right parameters, but then it crashes a couple of lines further down the code. with: `System.NotSupportedException: Specified method is not supported. at Microsoft.TeamFoundation.Integration.Server.CommonStructureService.Microsoft.TeamFoundation.Framework.Server.ITeamFoundationService.ServiceStart(TeamFoundationRequestContext systemRequestContext)` – jessehouwing Aug 18 '15 at 18:53
  • But that's either an update to this question or a new question altogether and in that case, please award and close this one. – jessehouwing Aug 18 '15 at 18:56
0

Here is a solution proposed by Microsoft to solve the problem with features4tfs on TFS 2015 RTM :

insert this line

deploymentHostProperties.PlugInDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Microsoft Team Foundation Server 14.0\Application Tier\TFSJobAgent\Plugins");

just after this line (line 68)

TeamFoundationServiceHostProperties deploymentHostProperties = new TeamFoundationServiceHostProperties();

After that it works perfectly on TFS 2015 RTM.

Gabriel
  • 333
  • 2
  • 8