TFS - dll is locked for check-out by user

2020-06-09 06:40发布

2 projects under TFS Source Control.

  • DependancyProject.sln

  • AppProject.sln

With AppProject referencing DependancyProject.

-

The issue I have is with an Installer project in the AppProject. It has DependancyProject.dll as a 'reference'(?) where it tries to include it in the GAC.

When I try to build this project, to create an MSI to install the App, I get the error

The item $/Assemblues/DependancyProject/bin/debug/DependancyProject.dll is locked for check-out by USER in workspace HIS-PC-NAME.

(The PC in question is not dead and not used)

The dll is not (as far as I can see) checked into Source Control. The path it references anyway does not exist when I browse through it (no bin folder).

The DependancyProject is refernced by pretty much every project in Source Control, and i've never had any issues with it. It builds, all the other projects build. It's just this one Installer Project which doesn't.

And I can't see why it would need to try and modify it anyway. All it needs to do (I'm assuming) is make a copy of it.

Any ideas here?

3条回答
等我变得足够好
2楼-- · 2020-06-09 07:14

I had the same problem, and this guide solved all my problems.

The file was actually locked by me, but in a different work space (old computer).

Had to use the tf undo command to unlock the files.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-06-09 07:28

Some files are configured as "non-mergeable" in TFS, which means that they'll be locked when changes are pended on them. The default list includes a variety of binary files, including .dll files. Note that this lock applies to all pending changes - including adds.

It's likely that the other developer in question accidentally pended adds for his bin directory - and any binary files in that directory (ie, most of them) would have been locked as well due to being in that unmergeable list.

You will not be able to pend other changes (including an add in a different workspace) while these items are locked. To break this lock, the other developer can do this by undoing the pending changes, or a server administrator can do it using the Find in Source Control functionality in the Team Foundation Server Power Tools.

That said, I don't know why your build process is trying to pend an add on that file.

查看更多
何必那么认真
4楼-- · 2020-06-09 07:34

If you are not going to use that workspace again, you can delete it by going to workspace pull down, selecting workspaces, and enabling the check box "Show remote workspaces". you can then select it and remove it.

查看更多
登录 后发表回答