Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 11 power tools checkin policies

We're trying out Visual Studio 11 Beta. Everything is going fine except that we can't check in files without ignoring several check-in policy failures. For example:

Internal error in Changeset Comments Policy. Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=8.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). Installation instructions: To install this policy, follow the instructions in CheckForComments.cs.

We're using some of the check-in policies from the TFS Power Tools. They obviously work just fine with Visual Studio 10. But I need to get them working in VS11, too. I've tried adding the registry keys to register the policies for Visual Studio 11:

Registry keysRegistry location

I've also tried adding several binding redirects to the devenv.exe.config file because those TFS Power Tools policy assemblies reference the Visual Studio 10 assemblies.

<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.VersionControl.Common.Integration" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.Common.Library" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Proxy" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client.Cache" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client.RuleEngine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client.Provision" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client.QueryLanguage" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="10.0.0.0-99.9.0.0" newVersion="11.0.0.0"/>
</dependentAssembly>

<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="8.1.0.0-9.9.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.PowerTools.CheckinPolicies.CustomPathPolicy" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="8.1.0.0-9.9.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ForbiddenPatterns" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="8.1.0.0-9.9.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity name="Microsoft.TeamFoundation.PowerTools.CheckinPolicies.WorkItemQueryPolicy" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="8.1.0.0-9.9.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>

But still, no luck. I'm getting the same errors. Any ideas? Has anyone else gotten the TFS Power Tools checkin policy pack to work with VS 11? Have you been able to get any check-in policy to work with both VS10 and VS11?

like image 561
Matt Varblow Avatar asked Mar 02 '12 14:03

Matt Varblow


1 Answers

We were successfully using the 2005 TFPT with VS 2005, 2008, 2010. However, out of the box, the 2005 and 2008 TFPT will not work with VS11. But, as Dave suggested in the comments, some of the 2010 TFPT check-in policies will work out of the box with VS11. Here's what I discovered with a bit more experimentation:

When I changed the policy configuration in TFS to use the TFPT 2010 policies the Changeset Comments policy worked fine out of the box - no registry or config file hacking required. The Custom Path and Forbidden Patterns policies did not.

FYI - To reconfigure TFS to use the TFPT 2010 policies I simply removed the policies (from the Source Control Settings dialog) and then added them again. The key is to re-add the policies from a computer with TFPT 2010 installed (not TFPT 2005 or 2008).

If you're OK with the registry and config file hacks, see this post for hacks that will work for all the TFPT 2010 policies:

http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/6bd4fe2f-b06a-49c4-a4d0-5a75d3dc3dd3/

Update:

Here's the response I received from Microsoft on the forum thread (link above):

The changeset comments policy was rolled into the product -- it's no longer part of the power tools. We've also done some additional work to make the in-box VS 2010 and VS 11 check-in policies play nicely with each other (you should be able to set them up with either client and have them work with either client). We should do this same compatibility work to the rest of the power tools check-in policies before we ship the final version. I'll file a work item to make sure this happens -- but I'm not sure it made it in for the Beta version of the VS 11 power tools. (I don't think the Beta power tools are out just yet -- but they're almost done.)

like image 128
Matt Varblow Avatar answered Oct 17 '22 08:10

Matt Varblow