I have to add my solution to TFS, in Visual Studio 2013, when I click on Check-In button in Team Explorer window, I get this error message:
C:\Projects\2013\MyCompany.MySolution\MyProject\adminpages\images\someimage.gif: The process cannot access the file because it is being used by another process
Obviously I checked if this file is being used by another process, using Process Explorer and LockHunter, but nothing was found. Im curious why these files, they are not used anywhere.
Any idea what it could be? because of this stupid error I can't check-in the solution to TFS.
Thanks.
I also encountered this issue and tried several things such as restarting VS and even my machine but the only solution that worked (more like work-around) is checking in using another visual studio such as 2012.
At times, VS can disagree with what you are checking in based on what it sees in your solution/projects. I have seen this from time to time when creating a new project and moving files around underneath Visual Studio (ie. without using the interface inside VS).
Here's how I would correct the issue:
Save your project and close Visual Studio 2013.
Open a 'Developer Command Prompt for VS2013' and cd to the folder containing your solution.
Issue the following commands:
tf add /recursive .
tf checkin /recursive .
then, copy your original source elsewhere:
robocopy /MIR . C:\Temp\Original
then, remove the current source and re-get from TFS
cd ..\
rmdir /s /q <foldername>
tf get /force /recursive <foldername>
Open your solution and ensure everything works properly. Correct issues as you encounter them using the 'backup' you robo-copied earlier if necessary.