Missing lock icon for some projects in a managed source

I have a great solution in Visual Studio that is under the control of a TFS source, but I noticed that one of the projects (C #) does not have a lock icon next to it in the solution explorer.

The project and its files are under source control, I can see the history and perform other tasks. None of the files have a lock, but the properties folder does it oddly.

What is the reason that it will break and how to fix it.

+7
tfs visual-studio-2012
source share
5 answers

All that is wrong is that the project file does not have the correct binding to TFS. There is no section 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) means the solution already knows.

As far as I know, this only affects the display of version control status in Solution Explorer, as already noted, you can already perform other project version control tasks. This is not much, but worth fixing, as it is a good visual check that everything is controlled.

To fix this, select the project in the solution explorer, then go to File> Source Control> Advanced ...> Change Source Control ... Select the project in this list ( it will probably look accurate and valid), click Undo, leave a warning, then click Bind (the same button on the toolbar has been redone). Window this window and check all the files that it offers. This will lead to the necessary changes and padlocks will appear. Review and review the changes to save them.

+18
source share

The icon was missing for me too .... but ALSO, the actual .csproj did not appear in the Control Manager view for TFS. (The value of .csproj was not really controlled by the source code ... even though all the directories and project files were source controlled.)

The solution for me was to open the folder in the TFS Source Control Explorer in Visual Studio 2015 .... and also open the Windows File Explorer window where I could see the .csproj file on my local computer ..... And then just drag and drop the file from Windows File Explorer into the Visual Studio TFS Source Control Explorer window.

Then I immediately saw that the project has a plus sign (and it was also visible in the list of pending changes). I checked, and now a lock icon appears in my project!: - D

+7
source share

Webturner has the right solution. But in addition to this, I had to manually add the project file to TFS from the file system (right-click the project file โ†’ Team Foundation Server โ†’ Add). Then unbind / bind in VS as suggested by Webturner. For me, all this was caused by the previous renaming of the project file.

+2
source share

If the project file (.csproj) is not in the source control, it will not have a padlock next to the project.

0
source share

I assume several things are possible here.

The last incarnation of this for me was decided by right-clicking on the project, source control, online.

0
source share

All Articles