The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • Pages

  • All categories

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

    Join 1,854 other subscribers

Archive for the ‘Source Code Management’ Category

Solving the “Some projects have been bound to server locations that may be incorrect.” in Visual Studio 2010 when using Team Foundation System 2010 #VS2010 #TFS2010

Posted by jpluimers on 2012/08/23

A while ago, I inherited a bunch of C# and VB.NET projects. One of them always generated the below error when including it in Team Foundation System (yes, the original projects were salvaged from Visual Source Shredder version 6.0c):

[Source Control]
Some projects have been bound to server locations that may be incorrect.
A location may be incorrect either because it does not contain the majority of the projects' files or because those files are not in the correct location relative to the specified server folder.
You should probably fix all the bindings in the solution. However, you may continue and bind these projects to the specified locations even when some may be incorrect.
[Fix server bindings] [Continue with these bindings] [Help]

First I tried the Help button: it links to a Help page on MSDN explaining the error can be cause with some statistics on projects not being in the source control system. Since all projects were, there, I looked for more information.

I tried finding a “Fix Server Bindings” or a 2010 “Some projects have been bound to server locations that may be incorrect” link that fitted my use case (getting projects from VSS into TFS), but the solutions I tried eventually all led to the same issue.

Fixing the server bindings would always fail: the solution (which itself is also a project) would get the status Invalid.

The next steps were these:

  1. add an empty solution in the same directory as the original one,
  2. add that solution to TFS
  3. add the projects from the original solution to this solution one by one
  4. check after each addition of the bindings were still OK using the “File”, “Source Control”, “Change Source Control” sequence on the right.
    (note that you don’t always see “Change Source Control”, if you don’t select the solution in the Solution Explorer before going to the File menu).
  5. text compare both .SLN solution files
  6. observe that “Solution Items” actually is a project just like the others:
    Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8D9964D4-6129-4B8F-9238-F9161A02B968}"
    ProjectSection(SolutionItems) = preProject
    ...
    Framework\Config.dll = Framework\Config.dll
    ...
    EndProjectSection
    EndProject
  7. add the existing solution item from the original solution to this solution one by one, check
  8. check after each addition of the bindings were still OK using the “File”, “Source Control”, “Change Source Control” sequence on the right.
    (note that you don’t always see “Change Source Control”, if you don’t select the solution in the Solution Explorer before going to the File menu).
  9. copy the non-existing solution items to the solution one by one using the text compare tool (yes, a lot of the projects are dirty and contain references to files that are not in the version control system)
    save after every copy, then reload the project in Visual Studio
  10. check after each addition of the bindings were still OK using the “File”, “Source Control”, “Change Source Control” sequence on the right.
    (note that you don’t always see “Change Source Control”, if you don’t select the solution in the Solution Explorer before going to the File menu).
  11. after a few files, suddenly the “Invalid” appeared, so the issue has to do with missing files.

Reading the Help more carefully, with in the back of my mind keeping “Solution Items” all as projects, I finally got the cause:

When some percentage of Solution Items cannot be found locally, and are not in the version control system, Visual Studio marks the solution binding to the version control system as “Invalid”.

The temporary solution is to ignore the error, until I have found all the missing files (they are scattered around some network shares), or made sure they are not needed at all.
There are many of those (you recognize them from the missing padlock icon in the Solution Explorer).

Version control rot is just like link rot, that’s why one of the high priority action items is to introduce for build automation at this client, then deploy those as clean builds into the Develop and Test stages of the DTAP, then verify if the solutions still work).

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Internet, link rot, Power User, Software Development, Source Code Management, TFS (Team Foundation System), VB.NET, Visual Studio 2010, Visual Studio and tools, WWW - the World Wide Web of information | Leave a Comment »

Great post on the differences between TFS, SVN, CVS and other source code management systems, ideas on Trunk/Tag/Branch

Posted by jpluimers on 2012/07/19

When switching between different source code management systems for doing version control at clients, it is always a bit of “getting used” to the mantra of both their system, and how it has been implemented.

Few people can really explain this well.

Richard Berg did in his great StackOverflow answer sharing his ideas on how to handle Trunk/Branch/Tag (for people starting with SVN, read this answer by David Schmitt before you mix them up).

I still see truckloads of people, and even teams try to do without version control. Please do use source control. If you don’t know where to get started, read some text on Source Control for beginners, or for instance the free on-line Red Bean books on SVN, Mercurial or CVS.

Also read some other great answers by Richard Berg (many on TFS, but also this very balanced view on usage of nullable in languages and proper use of Invoke-Expression in PowerShell: recommended reading).

–jeroen

Posted in Mercurial/Hg, Source Code Management, Subversion/SVN, TFS (Team Foundation System) | Leave a Comment »

TFS – Undelete File or Folder – brilliantly easy from the Visual Studio IDE: just enable “Show deleted items in the Source Control Explorer”

Posted by jpluimers on 2012/06/19

Never knew it was so brilliantly easy to undelete files from TFS: you can do it in Visual Studio, by enabling “Show deleted items in the Source Control Explorer” in the settings.

Just look at TFS – Undelete File or Folder for the screen shots.

Not sure in which Visual Studio version this got introduced, but it works in VS 2010 and up.

–jeroen

Posted in Development, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio 11, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Some research links on “change assemblyversion during checkin ccnet” – via Google Search

Posted by jpluimers on 2012/05/15

(Thanks to a “Missed Post” problem on WordPress.com, this one didn’t get posted on the scheduled date. Sorry for any inconvenience)

One of the next steps in the automated build process I’m setting up is increasing AssemblyVersion values after succesful builds.

It is is in a CCnet / TFS2010 / VS2010 environment.

Some links:

–jeroen

via: change assemblyversion during checkin ccnet – Google Search.

Posted in .NET, C#, Continuous Integration, CruiseControl.net, Development, Missed Schedule, SocialMedia, Software Development, Source Code Management, TFS (Team Foundation System), WordPress | Leave a Comment »

CodePlex TFS 2010 login: prefix login with “snd\” domain and suffix username with “_cp” (via Ahmed Al-Asaad’s Blog)

Posted by jpluimers on 2012/01/18

I keep forgetting this:

When logging in to CodePlex using TFS, then you need to prefix your username with “snd\” and suffix it with “_cp“.

So if your CodePlex username is wiert, then your login becomes snd\wiert_cp.

Somehow, this used to be more prominently on the codeplex site, but it isn’t any more.

–jeroen

via: TFS2010 « Ahmed Al-Asaad’s Blog.

Posted in CodePlex, Development, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

Added a few links to my “Tools” page, @WordPress bug spuriously inserting div tags still present.

Posted by jpluimers on 2011/12/28

While re-designing a Visual Studio 2010 plus Delphi XE2 install for a specific client, I updated some of my Tools page links:

And found out that the WordPress still wrongly inserts div tags when you step out a list by pressing Enter twice is still present. Annoying, as it has been there for at least 2 years, so I’m still interesting in people having a workaround for it.

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development, TFS (Team Foundation System), Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | 1 Comment »

svn – How do I move a file or folder from one folder to another in TortoiseSVN? – Stack Overflow

Posted by jpluimers on 2011/12/21

Duh – sometimes simple things are simple, you just have to know how simple: move it using the right mouse click as Mark Embling answers on StackOverflow.

–jeroen

via: svn – How do I move a file or folder from one folder to another in TortoiseSVN? – Stack Overflow.

Posted in Development, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

tortoisegit – Porting TortoiseSVN to TortoiseGIT – Google Project Hosting

Posted by jpluimers on 2011/10/26

This should be the first line on the TortoiseGITS home page; I always keep forgetting this step at new installations:

Please install msysgit 1.6.1 or above before install tortoisegit http://code.google.com/p/msysgit

–jeroen

via tortoisegit – Porting TortoiseSVN to TortoiseGIT – Google Project Hosting.

Posted in Development, DVCS - Distributed Version Control, Software Development, Source Code Management | Leave a Comment »

SVN 1.7, TortoiseSVN and CollabNet 2.1.0 released earlier this week

Posted by jpluimers on 2011/10/14

Right after the Subversion SVN 1.7 release earlier this week, 3rd party providers announced new versions of their products too.

These are the updates of the ones I use most often:

Two major improvements for me:

  1. Improved meta data (read: only one .svn directory in the root of a working copy)
  2. Faster HTTP speed

Please also read Uwe Schuster‘s (the guy that implemented the version control integration for SVN and Git in the Delphi IDE) blog post on a few things you need to watch when upgrading to Tortoise SVN 1.7.

–jeroen

Posted in Delphi, Development, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Reading list: Version Control by Example

Posted by jpluimers on 2011/08/01

Great stuff to read: Version Control by Example by Eric Sink of SourceGear and Spyglass fame.

–jeroen

Posted in Development, DVCS - Distributed Version Control, Source Code Management | Leave a Comment »