I have a large solution in Visual Studio that is under TFS Source Control but I've noticed one of the projects (c#) doesn't have a padlock icon next to it in Solution Explorer.
The project and it's files are all under source control, I can look at the history and do other tasks. None of the files have the padlock, but strangely the properties folder does.
What is the cause, what does it break and how do I fix it.
All that is wrong is that the Project file does not have the correct binding to TFS. There is a section missing in the .csproj file that should look something like this:
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
Where SAK (probably) stands for Solution Already Knows.
As far as I know it only affects the display of the Source Control status in the Solution Explorer as noted you can already perform other source control tasks on the project. It's not much but worth fixing as it's a good visual check that everything is being controlled.
To fix it highlight the project in the Solution Explorer, then go to File > Source Control > Advanced... > Change Source Control... Select the project in question in that list (it'll probably look fine and valid), click Unbind, ok the warning then click Bind (the same toolbar button relabelled) Ok that window, and checkout all the files it suggests. This will make the necessary changes and the padlocks should appear. Review and check the changes to keep them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With