0

I have a custom check in policy that works fine when I check in through VS. However, when I'm trying to check in through the file explorer (right clicking on a file and selecting Team Foundation Server > Check in) this fails.

I get an error 'Internal error in Test Checkin. Error loading Test Checkin policy (The policy assembly 'TestCheckin ...' is not registered). NOTE: Test Checkin is my custom policy and is pretty much blank since I want to test if it runs or not. Below is its Evaluate()

public override PolicyFailure[] Evaluate() { return new PolicyFailure[0]; }

I'm running:

Windows 10 with Visual Studio 2015, TFS Power Tools 2015

Server: Windows 2012 R2, TFS 2015

Dll registered in:

\HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0_Config\TeamFoundation\SourceControl\Checkin Policies

\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\TeamFoundation\SourceControl\Checkin Policies

Any ideas why it wouldn't work when trying to check in through the file explorer?

vkom
  • 233
  • 4
  • 12
  • Do you check in through Windows Explorer on the same machine when you do check-in in VS IDE? – Vicky - MSFT Oct 13 '15 at 04:45
  • Same problem here. There's a distinct lack of integration when it comes to TFS custom checkin policies, it seems. Even the TFS command line utility tf.exe doesn't recognize your policy if you installed it via a VSIX - you have to resort to manually copying a registry key. – lesscode Apr 01 '16 at 19:01
  • 1
    Actually, it's not only custom policies - even a Comments Policy doesn't work in TFPT 2015 when cheking in from Windows Explorer: Internal error in Changeset Comments Policy. Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). – lesscode Apr 01 '16 at 19:04

1 Answers1

0

If you do check-in in Windows Explorer which is on a different machine when you do check-in in VS IDE, you need to register policy assembly on that machine as well. In other words, you need to register the policy assembly on every machine you would like to use that check-in policy.

Vicky - MSFT
  • 4,970
  • 1
  • 14
  • 22
  • Unfortunately, this is on the same machine which is throwing me off. – vkom Oct 14 '15 at 14:39
  • @vkom, do you check in in the workspace folder that is associated with the team project you enabled that check-in policy? You can 1). Clean the cache via deleting folder: C:\Users\username\AppData\Local\Microsoft\Team Foundation\6.0\Cache; 2). create a new workspace folder, and do check in again. – Vicky - MSFT Oct 16 '15 at 08:04