Hello,
I made a custom checkin policy which just asks if you are sure to checkin (its a demo), i then place it in C:\test\ and register the policy under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\TeamFoundation\SourceControl\Checkin Policies (With its path and dll name!).
Then i go to the source control properties and add a new checkin policy, my policy shows up in the the dialog box, and executes the code in the public bool Edit(IPolicyEditArgs policyEditArgs){ ... } (Shows a dialog box.)
Well so far so good...
But...
When i try to checkin or open the source control properties i get an Error message (Policy name is "Custom Policy"):
Error loading the Custom Policy policy (The policy assembly 'Demo.CustomPolicy, version=1.0.0.0, Culture=neutral, PublicKeyToken=436786786867868' is not registered.).
Installation instructions: .....
But it is registered in the registry what am i missing
Can anyone shed some light on this
Greetings

Custom Checkin policy error
netsql
Hello all,
I love it when you get a problem and someone has already had it (and solved it
)
I have just had exactly the same problem as Paul and changing the name of the registry key fixed it.
Thanks guys!
-Jamie
WetRivrRat
I now tried the Sample "Filename Filter policy" out of the VS SDK, this checkin policy is giving met the exact same problem i can selct it and set the Filter, but when i open the properties screen again or try to checkin i get the following error:
Microsoft Visual Studio
Error
Error loading the Filename Filter policy (The policy assembly 'Extensibility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not registered.).
Instalation instructions:
But it is registered in the register (doh!)....
Anyone
Alan Smith MVP
I just figgured it out, and came to the forum to post it and then i see the awnser is already here :) Thanx Tim.
For the value name i chose the same name as the assembly except for the ".dll" and now it works.
But now for the triky part this is in the SDK documentation in ..\Visual Studio 2005 SDK\2005.10\VisualStudioTeamSystemIntegration\Version Control\CheckIn Policy Extensibility.doc it says:
"String Values for policy assemblies can be registered underneath this registry key. The name of the value should be a user-friendly name that describes the check-in policy. The value stored should be the full path to the assembly that implements the policy."
Well the section in bold is just plain wrong, this is what coused me all this trouble.
Greetings
ChasP
-Removed-
- Reason: LineBreaks went AWOL ;) -
Matt Michuta
sambath ramachandran
I am using "Visual Studio Team Systems RTM", and "Team Foundation Server Beta 3 Refresh".
Davidarh
WN3335
Intruder
Seth Wenzel
Change the Value name to match the name of the assembly. So in the case above make it
Value Name: Extensibility.dll
Value data: C:\Program Files\Visual Studio 2005 SDK\2005.10\VisualStudioTeamSystemIntegration\Version Control\ExtensibilityPolicy Sample\Extensibility\bin\Debug\Extensibility.dll
KillerBoy
Hello Ed,
Thanx for your asistence,
I had already added the key in the registry under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\TeamFoundation\SourceControl\Checkin Policies]
Value name: SDK Policy Sample
Value data: C:\Program Files\Visual Studio 2005 SDK\2005.10\VisualStudioTeamSystemIntegration\Version Control\ExtensibilityPolicy Sample\Extensibility\bin\Debug\Extensibility.dll
Team Foundation (Beta 3 refresh) is a fresh install (so fresh that its even on a brand new machine).
I have readded the policy a dozen times to no effect. It adds perfectly and asks for the wildcard setting (like the sdk sample was designed to do), but when i open the source control settings page again i get the error.
I had first tried a policy i made myself but it gave the same error, so i assumed i had made an error in the code, but now the sample does the same thing :( Additionally i have even tried giving my custom policy a strong name, this still gave the same error...
-JW
This is indeed very odd that you can load the policy for edit yet cannot load the policy for evaluation. The only way I could explain this at this point is if somehow the policy stored in the Team Foundation Server differed from the one you have locally on your client.
I would like to see the registry value name and registry value you have for your policy in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\TeamFoundation\SourceControl\Checkin Policies (or it may be in HKEY_CURRENT_USER).
Was the Team Foundation Server upgraded or was this a fresh install
One thing to try would be to remove the policy and readd it to the Team Project right clicking on the Team Project in the Team Explorer and choosing the Team Project Settings, Source Control... menu and then the Check-in Policy tab. Let me know what happens when you do that.
I really want to get to the bottom of what is going on here.
Thanks for taking the time to report this.
Ed