locked
SccProjectName in VCXPROJ storing server path to project file RRS feed

  • Question

  • Why would you do this?  Every time we branch or merge a project file we get warnings about a "discrepancy between the solution's source control information about some project(s) and the information in the project file(s)".  This is annoying!
    • Moved by Yi Feng LiModerator Tuesday, April 12, 2011 6:41 AM TFS Version Control (From:Visual C++ General)
    Tuesday, April 12, 2011 1:18 AM

All replies

  • Hi Keith,

    I'm moving this thread to Team Foundation Server - Version Control forum for better assist.

    Thank you for your understanding.

    Cheers,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 12, 2011 6:40 AM
    Moderator
  • Hello Keith,

    Thanks for your post.

    Based on your description it seems that you put your solution into TFS Version Control. And when you do the branch or merge operation you got that warning message. However, for your issue I am a little confused as well.

    What version of TFS are you using? TFS2010 or TFS2008?

    In addition, what are the detailed steps to reproduce it? It is better if you can post us one screen shot.

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 13, 2011 5:39 AM
    Moderator
  • Here's the screenshot:

    http://cid-5a8d2641e0963a97.office.live.com/self.aspx/Public/VS2010-SLN-Load-Discrepancy.png

    I see this after I have created a new branch of our Trunk dir and then open the branched sln.  After the sln loads, all of the VCXPROJ's have been edited and all the changes are like this one:

    ORIG:
    <SccProjectName>$/ACME/Trunk/Source/Foo/Core/Web/ComServer/_Dll</SccProjectName>

    BRANCHED:
    <SccProjectName>$/ACME/Branches/Feature/Dev_4.1/Source/Foo/Core/Web/ComServer/_Dll</SccProjectName>

    This is pretty lame and will be an ongoing merge/maintenance hassle for us because we are heavy users of branching!  Perhaps you should have followed the C# project file model where there value gets set to SAK.

    Thursday, April 14, 2011 9:57 PM
  • Hello Keith,

    Sorry for the late response.

    Visual Studio uses source control binding information from both solution file and each project file during the initial solution loading. If during the initial solution opening there is a discrepancy between the binding information stored in solution file and information stored in project file, Visual Studio will attempt to fix this, and then you would get the “There appears to be a discrepancy between the solution’s source control information about some projects and the information in the project files.” error message.

    Just as you mentioned, could you please try setting the value of the SccProjectName node to be SAK? Just like:  <SccProjectName>SAK</SccProjectName>.

    I hope it can help you. If you still have anything unclear, please contact me.

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 19, 2011 3:34 AM
    Moderator
  • Yes that is how it works for C# project files but the new C++ project files (VCXPROJ) don't work that way.  When I unload the VCXPROJ, edit the project file, replace the server path in <SccProjectName> with SAK and reload the project file, I get the same error dialog about a discrepancy.  When I re-edit the file I see that SAK has been replaced by the server path again.
    Wednesday, April 20, 2011 4:40 PM
  • I have been having the same issue as Keith, and changing the SccProjectName to 'SAK' does not fix the issue.

    Thursday, May 5, 2011 1:18 PM
  • Turns out that the suggested fix does work but only if you update all the SCC elements.  It is easier to do this by selecting the solution in Solution Explorer, going to File -> Source Control -> Change Source Control and then unbinding everything.  Close the dialog, then re-open it and rebind everything.  Save the changes and compare the VCXPROJ files now.  The server path and the rest of the TFS info has been removed and replaced with SAK.



    • Proposed as answer by Keith Hill Saturday, June 18, 2011 7:13 PM
    Saturday, June 18, 2011 6:49 AM
  • Turns out that the suggested fix does work but only if you update all the SCC elements.  It is easier to do this by selecting the solution in Solution Explorer, going to File -> Source Control -> Change Source Control and then unbinding everything.  Close the dialog, then re-open it and rebind everything.  Save the changes and compare the VCXPROJ files now.  The server path and the rest of the TFS info has been removed and replaced with SAK.



    This worked for me, thanks Keith, but I didn't use VS to do it, just edited the project file manually and it was fine after that.  Thank god for SAK.

    Thursday, August 16, 2012 4:24 AM