none
Custom checkin policies do not work when using tf.exe checkin from command line

    Question

  • We recently upgraded from using VS 2010 with TFS 2010 to using VS 2012 Update 1 with TFS 2012 Update 1.  We have many custom checkin policies installed.  I have upgraded our checkin policies to use the new v11.0 assemblies and whatnot.  When I check code in through the VS 2012 GUI the checkin policies are obeyed and everything is fine.  However, if I open the Developer Command Prompt for VS2012 and use "tf checkin" to launch the pending changes checkin window, when I look at the Policy Warnings tab, all of our custom checkin policies report the "Internal error" that is shown when the user does not have the correct version of the checkin policies installed.  I know that the correct version is installed since everything works fine through the VS GUI.  Is this a known bug?  Do you have any suggested work-arounds for me to try?  Thanks.

    - Dan - "Can't never could do anything"

    Monday, February 25, 2013 5:53 PM

Answers

All replies

  • Hi,

    Thanks for your post!

    Please run the 'devenv /setup' so Visual Studio can rebuild some caches.

    For more information, please refer to http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/bfd4ede7-3b60-48a2-8344-a7b34e7d8d26 

    Hope it helps!

    Best Regards,


    Cathy Kong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 26, 2013 6:22 AM
    Moderator
  • Thanks for the suggestion Cathy.  I shut down all Visual Studio instances and ran "devenv /setup" from the Developer Command Prompt For VS2012.  It took about a minute to complete the operation. Unfortunately the problem remains after trying "tf checkin" again.


    - Dan - "Can't never could do anything"

    Tuesday, February 26, 2013 4:47 PM
  • Hi,

    Thanks for your feedback!

    Can you tell me how do you deploy your custom check in policy?

    For more information, please refer to the following thread:

    http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/b9eccbe6-9424-44f8-8d89-8695d7f4499a/

    Hope it helps!

    Best Regards,


    Cathy Kong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 6:24 AM
    Moderator
  • Thanks Cathy.  We do have both 2010 and 2012 versions of the checkin policy.  So we have a solution that has a 2010 checkin policies project with all of the actual code files in it and references the v10.0 TFS dlls.  These 2010 checkin policies are distributed using the TFS 2010 Power Tools by placing the checkin policy project's dll in a special folder.

    In that same visual studio solution we also have a 2012 checkin policies project that references the v11.0 TFS dlls and simply links to the code files in the 2010 project.  We then use a VSIX project to distribute and install the 2012 checkin policies.

    So on my computer right now I have both the 2010 checkin policies (which work properly in Visual Studio 2010 both from the VS GUI and from the "tf checkin" command line) and the 2012 checkin policies (which work properly in the VS 2012 GUI, but not in the "tf checkin" command line).

    We are hoping to go completely over to VS 2012 in the next few months (and uninstall VS 2010), but in the meantime we still have some projects that require VS 2010 to work in them (e.g. database .dbproj projects).


    - Dan - "Can't never could do anything"

    Wednesday, February 27, 2013 3:41 PM
  • Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support.

    Best Regards,


    Cathy Kong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 28, 2013 2:19 AM
    Moderator
  • Any movement on this?  Thanks.

    - Dan - "Can't never could do anything"

    Wednesday, March 06, 2013 7:46 PM
  • We are also experiencing this issue and would very much like a solution. We are also installing our custom policies as a VS 2012 extension (.VSIX).
    Wednesday, March 27, 2013 3:52 PM
  • Hi Deadlydog,

    Is there some TFS error message in Event log ?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Jun Zh - MSFT Microsoft Online Community Support

    Saturday, April 27, 2013 7:20 AM
  • Nope, not even an Informational message :(  I looked in the Event Viewer (Local) -> Windows Logs -> Application log.  Is there a different event log I should be checking?

    - Dan - "Can't never could do anything"


    • Edited by deadlydog Saturday, April 27, 2013 1:41 PM
    Saturday, April 27, 2013 1:39 PM
  • Hi

    Your question falls into the paid support category which requires a more in-depth level of support. Please visit the below link to see the various paid support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Jun Zh - MSFT Microsoft Online Community Support

    Friday, May 24, 2013 6:43 AM
  • I've logged a bug with Microsoft about this.  Please go up-vote it if you are having this problem too.

    - Dan - "Can't never could do anything"

    Tuesday, May 28, 2013 4:53 PM
  • Could you please tell us if you are able to get custom checkin policies to work through the command line to help us determine if it is just something that we are doing wrong, or if it is an actual bug with tf.exe?

    - Dan - "Can't never could do anything"

    Tuesday, May 28, 2013 4:55 PM
  • Never heard back.  Are you able to reproduce this problem on your end MS?

    - Dan - "Can't never could do anything"

    Friday, July 19, 2013 6:24 PM
  • A work around has been found and is discussed on the Microsoft Connect Bug.

    - Dan - "Can't never could do anything"

    • Marked as answer by deadlydog Tuesday, August 13, 2013 7:09 AM
    Tuesday, August 13, 2013 7:09 AM
  • I've also blogged about this problem and wrote a script to help address it for now, so check it out if you are also having this problem.

    - Dan - "Can't never could do anything"

    • Marked as answer by deadlydog Friday, September 06, 2013 9:44 PM
    Friday, September 06, 2013 9:44 PM