none
TFS CheckIN Policy issue

    Question

  • Hi,

    I tried a code review workitem and then made changes inside a file.

    Before checkin I have to assign my file code review to some code reviewer to review it. But it still allowing me to CheckIn the file.

    Please correct me where I'm missing.

    Thanks

    Ram

    Friday, September 17, 2010 1:57 PM

All replies

  • Hi Ramrajesh,

    Could you tell me if the Code review Check-In Policy is created by youself?

    Could you find any error information from the Event Viewer when you perform the check in?

    The following link is a project which is a combination of Code Review Work Item and Code Review Check-in Policy. The check-in doesn’t allow a check-in unless it has an associated Code Review work item, and that work item is set to approved. Only people in a TFS group named {Project}\Code Reviewers can set an item to approved.

    http://tfscodereviewflow.codeplex.com/

    You can download it and following the installation to use it.

    For more information, you can refer to http://blogs.microsoft.co.il/blogs/shair/archive/2008/09/21/how-to-create-custom-check-in-policy.aspx

    Hope it helps!

    If you have any concern, please feel free to let me know!

    Best Regards,

    Cathy Kong 

    Tuesday, September 21, 2010 7:14 AM
    Moderator
  • Hi Cathy,

    While clicking on $\project>SourceControl

    I'm getting below error:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Error

    Error loading the Code Review Policy policy (The policy assembly 'Code Review Policy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not registered.).

    Installation instructions:
    ---------------------------
    OK  
    ---------------------------

    please have a look. what i'm missing ?

    Thanks

    Ram

    Tuesday, September 21, 2010 12:25 PM
  • Hi RamRajesh,

    Have you registered in the policy?

    Please perform the following steps to register check in policy:

    1. Start Regedit.exe and locate the following key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Checkin Policies (TFS2010)
      The registered policies are listed in the right pane.
    2. Right-click in the right-hand pane, point to New, and then click String Value.
    3. Type the name of your custom policy dynamic link library (DLL), without the DLL extension; CheckForCommentsPolicy in the above example.
      Important: The new string name must match your DLL filename exactly, without the DLL extension.
    4. Double-click the new string value and set its value to the fully qualified path and filename to the .dll containing your custom policy.

    Hope it helps!

    Best Regards,

    Cathy Kong

     

    Wednesday, September 22, 2010 1:44 AM
    Moderator
  • Thanks Cathy,

    I added the registry key but I dont have dll. From where I should get it or I dont need ?

    After above activivty if I'm clicking on Check-in Policy > Code Review Policy , I'm getting the below error:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Error

    Error loading the Code Review Policy policy.

    Installation instructions:
    ---------------------------
    OK  
    ---------------------------

    Ram

    Wednesday, September 22, 2010 9:33 AM
  • Hi RamRajesh,

    Have you download the TFSCodeReviewWorkflow.zip from http://tfscodereviewflow.codeplex.com/releases/view/99?

    When you download it, open it and there is a folder called Product including Code Review Policy.dll,  Code Review.xml, and readme.txt files.

    You can following the steps in the following link to install the code review:

    http://tfscodereviewflow.codeplex.com/wikipage?title=Installation&referringTitle=Home

    Hope it helps!

    If you have any cocern, please feel free to let me know!

    Best Regards,

    Cathy Kong

     

    • Marked as answer by RamRajesh Thursday, September 23, 2010 12:52 PM
    • Unmarked as answer by RamRajesh Monday, September 27, 2010 7:50 AM
    Thursday, September 23, 2010 1:28 AM
    Moderator
  • Thanks Cathy,

    I did all these steps. But the problem is:

    If the developer do the wrong code (or the code which doesnt meet policy standards), still he/she able to checkin the code. ( I thing it should not allow in such case). Although I'm very new to this feature but unable to trace where I'm missing.

    Also see one of the above link(in your previous reply) doesnt working.

    Can you please provide me some other link which shows this from basics with some example elaborate the Code Review policy.

    Many Thanks for your time.

    Ram

    Thursday, September 23, 2010 12:53 PM
  • Hi RamRajesh,

    The above link is applied to TFS 2005.

    Could you tell me what version of your TFS? 

    Best Regards,

    Cathy Kong 

    Friday, September 24, 2010 1:34 AM
    Moderator
  • Hi Cathy,

    TFS version is 2008.

     

    Regards

    Ram

    Friday, September 24, 2010 12:38 PM
  • Even i am facing issues....

    I am using TFS 2008

    I was trying to install this checking policy on my machine and I have successfully imported the "Code Review.xml". But I am sorry to say I didnt find any process to import "Code Review Policy.dll". How can I replace it or register it so that I can easily access and used this policy. Secodly, the website link which is given in step 3 (http://www.gotdotnet.com/codegallery/codegallery.aspx?id=94a79007-aeaa-49a5-b966-99ad655aa4b9) is not working. I am getting the message that the Got Dot net server is shutdown. So please update latest path where we can acess the further steps.

    Tuesday, April 26, 2011 10:52 AM
  • Most of the additional policies are installed as part of the TFS Power Tools.  These need to be on each machine running Visual Studio rather than being local.  This will generally fix the issue, but I would hope that there will be an eventual strengthening of this to make policy evaluation a centralized process.
    Ryan Hanisco
    MCSE, MCTS:TFS 2010, SQL 2005
    techsterity.wordpress.com
    Wednesday, April 27, 2011 9:51 PM