From the never ending pains of using MS Team Foundation Server, came another one - an annoying issue with comment policy:
---------------------------
Microsoft Visual Studio
---------------------------
Internal error in Changeset Comments Policy. Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). Installation instructions: To install this policy, follow the instructions in CheckForComments.cs.
Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). Installation instructions: To install this policy, follow the instructions in CheckForComments.cs.
---------------------------
OK
---------------------------
Bellow is the solution (cooked from VS 2008 similar issue and some other answers around ms forum).
A. Modify Registry so VS2010 Can Find The PoliciesEdit the paths (using your Team Foundation PowerTools installation path) below and save text in a .reg file (or use regedit)
-----------------------------------------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Checkin Policies]
"Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments"="c:\\Program Files\\Microsoft Team Foundation Server 2008 Power Tools\\Check-in Policy Pack\\Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments.dll"
"Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ForbiddenPatternsPolicy"="c:\\Program Files\\Microsoft Team Foundation Server 2008 Power Tools\\Check-in Policy Pack\\Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ForbiddenPatternsPolicy.dll"
"Microsoft.TeamFoundation.PowerTools.CheckinPolicies.WorkItemQueryPolicy"="c:\\Program Files\\Microsoft Team Foundation Server 2008 Power Tools\\Check-in Policy Pack\\Microsoft.TeamFoundation.PowerTools.CheckinPolicies.WorkItemQueryPolicy.dll"
"Microsoft.TeamFoundation.PowerTools.CheckinPolicies.CustomPathPolicy"="c:\\Program Files\\Microsoft Team Foundation Server 2008 Power Tools\\Check-in Policy Pack\\Microsoft.TeamFoundation.PowerTools.CheckinPolicies.CustomPathPolicy.dll"
-----------------------------------------------------------------------------------
B. Set Binding Redirects in DevEnv.Exe.Config1. Close all instances of devenv.exe
2. Find where VS2010 Team Explorer or VS2010 devenv.exe is installed. Typically
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
3. Backup the existing devenv.exe.config file
4. Edit devenv.exe.config by adding the following in the <runtime><assemblyBinding> section:
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.VersionControl.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.VersionControl.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
5. Save devenv.exe.config
C. Enjoy