While working on a new check-in policy (for Visual Studio 2010) I came across an interesting issue. I had registered the policy under “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Checkin Policies” (for Windows 7, 64-bit OS). I had this policy setup with the name being different from the assembly name. The first time I added the policy everything seemed to work fine. However when I went back to view/change the policy I kept getting the error similar to the message below.
From searching online it seemed like the policy was not registered! How was this possible since I setup the policy from the same machine I am now trying to modify it…if it could find it initially why can it not find it now???
Turns out that the name (in the registry) should be the same as the assembly name and the data be the full path of where the assembly is stored. Since I had the name different from the assembly name, I kept getting this error. Once I changed it to be exactly as the assembly name, everything started working correctly.
Hope this helps others who are having this issue.