index > Team Foundation Server - General > Custom Checkin policy error

Custom Checkin policy error


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 

Paul Paschedag

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???

Paul Paschedag
I just realized i didnt mention the product versions.

I am using "Visual Studio Team Systems RTM", and "Team Foundation Server Beta 3 Refresh".
Paul Paschedag
Paul,

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

 
Ed Hintz

-Removed-

- Reason: LineBreaks went AWOL ;) -

Paul Paschedag

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...

Paul Paschedag

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




Your friendly neighborhood hippie
Tim Noonan MSFT

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

Paul Paschedag

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




http://blogs.conchango.com/jamiethomson
Jamie Thomson
We'll get a bug filed to correct the documentation, if there isn't one already.


Chris Rathjen
CRathjen-MSFT
The doc team filed a bug to correct the documentation. Thanks for bringing this to our attention.


Chris Rathjen
CRathjen-MSFT
Thanks for the feedback. I fixed this doc bug in the document source.
richard.edwards
The latest release of the documentation appears to still have this issue...
William Bartholomew
reply 13

You can use google to search for other answers

 

More Articles

Unable to change WSS template
Customizing work items - Remaining/Completed work
SharePoint Portal... Web Parts Broken?
How to clean TSF install
Specify Own Build Steps in VS2005 Based Output
Access to Project Queries over team site
Can't connect to a team foundation server
how do i make Domain groups into global groups
How to make TFS recognize my new WSS template (.stp file)?
named instance of SQL Server in beta refresh
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Sort order on Iteration in work item view
source control server events
Delete files from local folder
Get Latest Version not bring all the fil…
How to change user connected to team fou…
Programatically Creating WorkItems
SqlException Error converting data type …
How to use TFS best as a code-reviewer
TFS Source Control Remote Working
Would this be solved by shelving?
Document templates in TFS
Source Code Control-how to work from hom…
TFS diff tool
Permissions bug?
Where is tbuild?

Hot Articles

SharePoint Portal Server problem
Workgroup to Active Directory upgrade fo…
Policy violations email
Single checkout model, conflict??
traceability in Team Foundation Server
How to use workspace.checkin with workit…
Shared auto-generated stub file in Sourc…
TFS Project status
CqConverter.exe - User needs membership …
Setup does not find the database server
Problem capturing events from TFS.
Team Build Server error
Customer Feature requests
TFS Pricing
Unique id per workitemtype

Recommend Articles

Bug Reporting
Visual Studio Team System and Visual Stu…
Problem in login TFS through Teamprise e…
MSProject Fields Mapping Problem
Upgrade from B3R to RC on a new server
Initialization for plugin "Microsof…
Custom check-in policy
TeamFoundationServerUnauthorizedException
How to team build and publish a web site?
Where can a non-MSDN subscriber get TFS …
Team Build vs MSBuild
MS Project Mapping Problem
Sharepoint Portal Page Components and Re…
File/directory exclusion patterns
EndToEndIteration target