问题
I have followed the steps on this website: http://msdn.microsoft.com/en-us/library/bb668980.aspx to create a TFS Custom Check-In Policy. I have updated the registry as it suggests except to Visual Studio 11.0 instead of 8.0
In Visual Studio 2012 -> Team Explorer -> Settings -> Source Control ->Check-In Policy Tab I click on Add. I see 4 policies, but mine is not listed.
I have VS 2012 installed on my computer. I created the policy dll with VS2012 and referenced the 11.0 Microsoft.TeamFoundation.VersionControl.Client assembly.
Please note TFS 2010 is installed on the source control server.
回答1:
If your OS is 64-bit, you must add the checkin policy under the Wow6432Node instead of the path stated on MSDN:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Checkin Policies
UPDATE
An alternative registry path, at least used when installing policies through an extension (.vsix) is
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\TeamFoundation\SourceControl\Checkin Policies
来源:https://stackoverflow.com/questions/14571063/tfs-custom-check-in-policy-is-not-in-the-add-box