0
votes

I'm having trouble with the permissions associated with creating new Team Projects in TFS 2015 from Visual Studio Enterprise 2015.

Everyone in our team is a member of a common AD group, which through a series of group memberships (see below) ended up in the Project Collection Administrators group of our main collection. This means that everyone in the team can see everything, do pretty much everything, and isn't ideal so I made a couple of changes and everything appears to be working correctly except creating new projects.

Whenever anyone other than me tries to create a new project the wizard kicks off and then fails shortly after with the following message:

TFS error

I can grab the full log if necessary, but the exception is here:

---begin Exception entry---
Time: 2016-04-05T16:09:20
Module: Engine
Event Description: TF30162: Task "Queries" from Group "WorkItemTracking" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: Sequence contains no matching element
Stack Trace:
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Execute(ProjectCreationContext ctxt, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.TaskExecutor.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.RunTask(Object taskObj)
--   Inner Exception   --
Exception Message: Sequence contains no matching element (type InvalidOperationException)
Exception Stack Trace:    at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.QueryTask.GetPublicQueryFolder(Project project)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.QueryTask.Parse(Boolean execute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.QueryTask.Execute()
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Parse(ContextWrapper wrapper, XmlNode taskXml, Boolean fExecute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Execute(ProjectCreationContext ctxt, XmlNode taskXml)

--- end Exception entry ---

I'm running Visual Studio Enterprise 2015 with Update 2, and it works fine on my laptop with the Agile template. I've logged in with another user account on the exact same laptop, tried the Agile and Scrum templates and both have failed in the exact same place. Another user has tried separately with Visual Studio Enterprise 2015 with Update 1 and they have encountered the same error. This particular user has been able to created team projects before.

Because it was working before I changed the permissions, and because it's still working for me, I don't think there's an issue with the project template or TFS itself, so I'm leaning towards it being a permissions issue and I just haven't given the other users the right permission/membership to the right group to allow them to create the template correctly. I always have the fallback of putting the permissions back as they were before I started editing them, but it would be great if I could actually resolve this issue so I don't essentially have everyone in the team as collection admins.

Any ideas on how to resolve this?

Edit: I've been altering various permissions today to see if I can resolve this myself, and as a test I simply undid the permission changes detailed below, and it works fine - as such I'm pretty certain it's permissions, but which ones I have no idea.

Permissions before:

  • Everyone is a member of our AD group
  • Our AD group is a member of the server's local admin AD group
  • The local admin AD group is a member of [BUILTIN]\Administrators
  • [BUILTIN]\Administrators is a member of [TEAM FOUNDATION]\Team Foundation Administrators
  • [TEAM FOUNDATION]\Team Foundation Administrators is a member of [Our Collection]\Project Collection Administrators

Changes made:

  • I removed [TEAM FOUNDATION]\Team Foundation Administrators from [Our Collection]\Project Collection Administrators, leaving just me and another user directly in [Our Collection]\Project Collection Administrators.
  • I then set the Create New Projects permission to Allow on our AD group - without this users other than me can't even start the wizard
1
That link relates to an issue where they're having trouble with some templates but not others - my problem relates to all templates for some users, but works absolutely fine for me for all templates.alfredbulbasaur

1 Answers

1
votes
  1. Clean the Cache folder on client computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\6.0\Cache.

  2. Clean the Cache folder on Server machine. The folder path is: C:\TfsData\ApplicationTier_fileCache

  3. After cleaned, on Server machine, click Start and select Run… to open the dialog box, then input iisreset.exe and click OK, wait it run completely.

  4. Check Event log in Event Viewer to see whether there is useful information.