The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,513 other followers

SccProjectName value in .csproj hosed – strange build results (via: Interesting support case – Visual Studio solution prompts for entire SCC check-out on open – Developer Support Team Foundation Server – Site Home – MSDN Blogs)

Posted by jpluimers on 2011/03/24

Something in TFS screwed a SCC references in one of the .csproj files at a client.

As a result, it generated strange build errors (unfound projects in the wrong branch), because when loading project from the correct, the IDE in fact loads it from the wrong branch.

When you read the blog post from the Microsoft TFS development support team, the solution looks simple: in a regular project the values for SccProjectName, SccLocalPath, SccAuxPath and SccProvider should all be SAK (indicating the SCC should ignore their values).

That is only 1 piece of the solution. Somehow, Visual Studio and/or TFS seem to cache some information in hidden places, so it keeps insisting to use the project from the wrong branch.

So, in addition to changing the above SAK values in the project in the correct branch, you need to:

  1. Also check (and if wrong change) the above values to SAK for the project in the wrong branch
  2. Remove the references to the project in the wrong branch from the Visual Studio MRU list in the registry (HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList)
  3. Delete the .suo file for the good solution
  4. Add the project from the correct branch to the solution
  5. Manually modify the .sln file in the correct branch to remove the relative directory paths to the project in the wrong branch (values in keys named like SccProjectUniqueName58, SccProjectName58 and SccLocalPath58)
  6. Reload the solution in Visual Studio and check everything works correctly

It took at least a couple of hours to find this all out, for these reeasons:

  1. This part of both branches was not included in a continuous integration cycle because it hadn’t been changed for a long while
  2. Development on the development machines was being done on the project in both branches
  3. Visual Studio does not warn you when it the correct binary files of the wrong branch in the Debug/Release directories can be found (even when it cannot compile the projects they belong to)

The error came to light when the bad branch got cleaned out: then Visual Studio could not find the binaries, nor generate them, and started complaining.

Now the solution is in the continuous integration cycle :-)

–jeroen

via: Interesting support case – Visual Studio solution prompts for entire SCC check-out on open – Developer Support Team Foundation Server – Site Home – MSDN Blogs.

2 Responses to “SccProjectName value in .csproj hosed – strange build results (via: Interesting support case – Visual Studio solution prompts for entire SCC check-out on open – Developer Support Team Foundation Server – Site Home – MSDN Blogs)”

  1. bclayshannon said

    “Selete the .suo file for the good solution”

    Is this (“selete”) a portmanteau, for “select and delete”?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: