locked
Automatic Checkout on Build Solution RRS feed

  • Question

  • On some of my vs solutions i have the problem that on each build visual studio makes a checkout of my solution even if i have not made any changes.
    I use vs 2008 sp1 and tfs 2008 sp1.
    Any ideas why have have this behavior?
    Wednesday, August 5, 2009 8:57 AM

All replies

  • Hi stoffi

    If I understand you correctly, when you build some solutions in VS locally, the .sln files are checked out during the build. There are some possible reasons I can think of:
    1. VS 2008 supports checking out files automatically when one attempts to edit them. You might have some add-in that changes .sln files during the build, which causes VS to check out them.
    2. You might execute commands like "tf checkout", "tf lock" in some project's build events or build targets.


    Therefore, we can try a few things:

    1. Turn off auto check-out feature of VS. You can go to Tools | Options | Source Control | Environment, then set Saving and Editing to "Prompt for check out".
    2. Build the solution again in VS and open the Output window via View | Output. Are there commands like "tf checkout" or "tf lock" that are executed for the .sln file?

    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, August 5, 2009 10:40 AM
  • Yes i have turned on automatic checkout on edit. But i won't turn off this feature because it is very comfortable. What kind of add-ins can cause this. Have you any example. And why on some solutions i don't have this problem?
    Wednesday, August 5, 2009 11:34 AM
  • My point was that we can turn off automatic checkout just for troubleshooting purpose. After you turn off this feature, build the solution again in VS.

    Does VS show a dialogbox asking for checkout during the build? Are there commands like "tf checkout" or "tf lock" that are executed for the .sln file in the Output window?
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, August 5, 2009 12:53 PM
  • Ok i will verify with my developer team then i rewrite you again.
    Wednesday, August 5, 2009 1:00 PM
  • Ok after turn off this feature we launched the build. Visual Studio ask's as for checkout only if we turn auf the automatic checkout on save. But in the output window i don't found any command like "tf checkout" or "tf lock".
    Any ideas?
    Wednesday, August 5, 2009 1:36 PM
  • What kind of projects do you have in your solution?  I've seen this bug off & on for many years, but it seems to be much worse when Silverlight and/or WCF projects are involved.
    Wednesday, August 5, 2009 5:36 PM
    Moderator
  • the projects are class library projects .Net 3.5 and Web Sites
    Thursday, August 6, 2009 9:49 AM
  • I think we can use Process Monitor for further troubleshooting. Process Mointor can tell us which process has modified the .sln file and most importantly, its call stack. Here are the steps:

    1. Start Process Mointor
    2. Rebuild the solution that can repro this issue.
    3. Save the Process Mointor log.


    You can either analyze the log yourself or mail it to me. My email is v-bilw@microsoft.com

    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 10, 2009 3:46 AM
  • send it by mail to you
    thanks
    Tuesday, August 11, 2009 9:18 AM
  • Hi stoffi

    I looked into the log today. Devenv.exe was modifying the .sln during the building. Here are parts of the call stack:

    46     msenv.dll CSlnUpdate::HrBeginSlnUpdate + 0xbf, f:\dd\env\msenv\core\slnupd2.cpp(3377)        0x5b96fc2c       c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\msenv.dll

    47     msenv.dll CSlnUpdate::HrUpdateProjects + 0xbd, f:\dd\env\msenv\core\slnupd2.cpp(2773)        0x5b9700e9     c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\msenv.dll

    48     msenv.dll CSlnUpdate::HrUpdateSolution + 0x3b, f:\dd\env\msenv\core\slnupd2.cpp(2712)        0x5b97012c     c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\msenv.dll

    49     msenv.dll HrExecBuildCmd + 0xb3, f:\dd\env\msenv\core\slncfg.cpp(8246) 0x5bb79949     c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\msenv.dll


    But I haven't figured out why VS modifies the .sln file yet because I can't access the source code of VS. I have a couple of thoughts to troubleshoot this issue:

    1. Before you build the solution, save a copy of the .sln file. Then build the solution and let VS modify the .sln file. Then compare it with that you previously saved with a diff/merge tool like WinDiff to find out what has been modified by VS.
    2. After the .sln file is checked out by VS during the build, please check it in and build again to see if VS still changes it in the subsequent builds.  



     

    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, August 12, 2009 8:01 AM
  • Ok now i have copy the sln file before the build. Then i launch the build. After the build and the automatic checkout the sln files are identical. I see also if i check-in the sln file the source control says me that there are no changes to checkin. Als subsequent builds causes also a checkout.
    Wednesday, August 12, 2009 8:30 AM
  • Know i have send to you a little test project where i have reproduced the problem. I hope you can also reprodue it.

    Steps to reproduce:
    1.       Create new webproject
    2.       Add the whole solution to sourcecontrol
    3.       Check in (Know if you build the sln will not checked out)
    4.       Close solution
    5.       Reopen solution
    6.       Add new class library to project
    7.       Check in
    8.       Build solution – Automatic Checkout

    I hope you can reproduce it.

    Wednesday, August 12, 2009 8:39 AM
  • Hi stoffi

    Thanks for providing the detailed steps to repro but it doesn't occur in my box. We are discussing about this issue. At the same time, could you run the below comamnds to reset the settings of VS? Before that, you might want to export your VS settings via Tools | Import and Export settings.

    devenv /resetuserdata
    devenv /resetskippkgs
    devenv /setup

    After that, please try starting VS both normally and in safe mode and check if the same issue still occcurs. To start VS in safe mode, you can use command devenv /safemode


    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, August 14, 2009 2:39 AM
  • After devenv /resetuserdata, devenv /resetskippkgs and devenv /setup the problem persits. Only with devenv /safemode i don't have this problem.
    I discoverd that even  on Getlatest on the solution vs makes a checkout.

    thanks
    Friday, August 14, 2009 7:28 AM
  • When you run VS in safemode with command "devenv /safemode", non of the 3rd party packages and addins are loaded by VS. So let's check if this issue is caused by 3rd party tools. In VS, please open
    1. Tools | Add-in manager
    2. Tools | Package Load Analyzer

    Are there any 3rd party package or addin loaded?

     

    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, August 14, 2009 7:36 AM
  • GostDoc for Visual Studio 2008 but we have installations without this plugin with the same issue.
    Friday, August 14, 2009 9:57 AM
  • Could you also run the commands:
    devenv /resetuserdata
    devenv /resetskippkgs
    devenv /setup

    and start VS in safe mode in the other machines with this problem? I think other plugins might also cause this issue too.

     

    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     

     
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, August 14, 2009 10:19 AM
  • Know i have tried it on a instance with no plug-ins installed. Always the same issue.

    Are you sure that it would be a plug-in? And why on some solutions we have this problem and on some others not? They only additional software we have installed all are the TFS Powertools 2.0 or October 2008 release. Can this cause the problem

    Our installation:
    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Enterprise

    Microsoft Visual Basic 2008  
    Microsoft Visual Basic 2008

    Microsoft Visual C# 2008  
    Microsoft Visual C# 2008

    Microsoft Visual C++ 2008  
    Microsoft Visual C++ 2008

    Microsoft Visual Studio 2008 Team Explorer  
    Microsoft Visual Studio 2008 Team Explorer
    Version 9.0.30729.1

    Microsoft Visual Studio 2008 Tools for Office  
    Microsoft Visual Studio 2008 Tools for Office

    Microsoft Visual Studio Team System 2008 Development Edition  
    Microsoft Visual Studio Team System 2008 Development Edition

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V.  All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company.  Electronic version licensed from Lernout & Hauspie Speech Products N.V.  All rights reserved.


    Microsoft Visual Web Developer 2008  
    Microsoft Visual Web Developer 2008

    Crystal Reports   
    Crystal Reports Basic for Visual Studio 2008

    Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB946260)   KB946260
    This hotfix is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946260.

    Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB946458)   KB946458
    This hotfix is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946458.

    Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB947171)   KB947171
    This hotfix is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947171.

    Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB947180)   KB947180
    This hotfix is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947180.

    Hotfix for Microsoft Visual Studio 2008 Team Explorer - ENU (KB948816)   KB948816
    This hotfix is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948816.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB944899)   KB944899
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/944899.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB945282)   KB945282
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945282.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB946040)   KB946040
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946040.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB946308)   KB946308
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946308.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB946344)   KB946344
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946344.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB946581)   KB946581
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946581.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB947173)   KB947173
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947173.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB947540)   KB947540
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947540.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB947789)   KB947789
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947789.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB948127)   KB948127
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948127.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB953256)   KB953256
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/953256.

    Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB971092)   KB971092
    This hotfix is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/971092.

    Microsoft Visual Studio 2008 Team Explorer - ENU Service Pack 1 (KB945140)   KB945140
    This service pack is for Microsoft Visual Studio 2008 Team Explorer - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945140.

    Microsoft Visual Studio Team System 2008 Development Edition - ENU Service Pack 1 (KB947888)   KB947888
    This service pack is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947888.

    Microsoft Visual Studio Team System 2008 Development Edition - ENU Service Pack 1 (KB948484)   KB948484
    This service pack is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948484.

    Microsoft Visual Studio Team System 2008 Development Edition - ENU Service Pack 1 (KB948560)   KB948560
    This service pack is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948560.

    Security Update for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB973675)   KB973675
    This security update is for Microsoft Visual Studio Team System 2008 Development Edition - ENU.
    If you later install a more recent service pack, this security update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/973675.

    Team Foundation Server Power Tools   October 2008
    Power Tools that extend the Team Foundation Server integration with Visual Studio.
    OR
    Team Foundation Server Power Tools   2.0
    Power Tools that extend the Team Foundation Server integration with Visual Studio.

    Process Editor WIT Designer   1.4.0.0
    Process Editor for Microsoft Visual Studio Team Foundation Server, Version 1.4.0.0
    OR
    Process Editor   1.1.0.0
    Process Editor for Microsoft Visual Studio Team Foundation Server, Version 1.1.0.0

    On some machines we have installed also :
    Microsoft Silverlight Projects 2008  
    Microsoft Silverlight Projects 2008
    Version 9.0.30729.146

    Sybase PowerDesigner   Integration Package v15.0
    Sybase, Inc. PowerDesigner 15.0.0.2613 for Visual Studio
    No valid PowerDesigner licence
    You may need to re-install product.
    For support, please visit www.sybase.com\support

    Enterprise Library Configuration Editor   4.0
    Microsoft patterns & practices Enterprise Library Configuration Editor

    Microsoft Visual Studio Team System 2008 Database Edition  
    Microsoft Visual Studio Team System 2008 Database Edition

    • Edited by stoffi Friday, August 14, 2009 12:06 PM
    Friday, August 14, 2009 12:03 PM
  • Some new ideas for this issue?

    Thursday, August 27, 2009 1:36 PM
  • Hi stoffi

    Sorry for the late response. I have been  blocked in other projects. It seems lots of effort will be required to troubleshoot this issue. I would suggest you contact a support professional at http://support.microsoft.com.


    Bill Wang

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, September 1, 2009 2:07 AM
  • Hi People,


    I'm with the same Issue on my solution. Just 2 computers on my office are like these. The other 4 still working fine.

    Stoffi, Did you contact the microsoft suport?

    Please, tell us any adivance,

    Thanks,

    Adolpho Galindo

    Tuesday, September 29, 2009 1:43 PM
  • Hi Adolpho
    no we don't contact support until now. But now whe have the problem on more workstations so we will open a call. If i have news i will post this here.
    bye stoffi
    Friday, November 13, 2009 1:51 PM
  • Know i have send to you a little test project where i have reproduced the problem. I hope you can also reprodue it.

    Steps to reproduce:
    1. Create new webproject
    2. Add the whole solution to sourcecontrol
    3. Check in (Know if you build the sln will not checked out)
    4. Close solution
    5. Reopen solution
    6. Add new class library to project
    7. Check in
    8. Build solution – Automatic Checkout

    I hope you can reproduce it.


    Thanks for your sharing! It's quite useful.
    Thursday, February 24, 2011 11:20 PM