5

I have a .NET 4 website in VS2010 stored in a TFS 2010 team project. I need to add a reference to System.Data.Linq.dll to the website. I am referencing a LINQ DataContext that is defined in another project and I get build errors saying that I need the reference to System.Data.Linq. I go up to the "Add Reference" menu option and add it like I would any normal reference, and it even shows up in the Web.config and in the Properties pages for the website... BUT if I build I still get the same error.

So I found a place in my code where I was referencing the LINQ count function and it told me it was invalid because I was missing a reference and it offered to add the reference automatically. I told it to add the reference automatically and it is at this point that I get the error mentioned in the subject:

TF14040: The folder $/Folder/Subfolder may not be checked out. No items were checked out

I've done some research online but I haven't been able to find much. I saw on a blog that making the folder not readonly fixed the issue for him, but it didn't seem to work for me unless I misunderstood something.

I tried loading up the project from source control onto a fresh computer where that project had never been loaded before and I can reproduce the issue the same way. Help would be greatly appreciated.

2
  • See if TFS sidekicks 3.0 (free) helps you troubleshoot the problem attrice.info/cm/tfs
    – Raj Kaimal
    Commented May 12, 2010 at 1:30
  • I tried TFS Sidekicks 3 at your suggestion but I could not find anything that seemed like it would work, though it could be I just missed it. I looked for anything related to force checkout/take ownership of a folder, that sort of thing, but with no luck.
    – Peter
    Commented May 13, 2010 at 0:28

3 Answers 3

6

FWIW, this error also occurs in different circumstances. I had the same error today from the command line when trying to use tfs checkout SomeFolder /login:user,password, although this was not within the context of an asp.net app, I'm currently working on dependency replication. For me, adding the /recursive command worked, like this:

tfs checkout SomeFolder /recursive /login:user,password

The hint to try that came from here, by the way.

0
1

I have no idea if this is your problem but I've noticed that TFS2010 seems to have some bug somewhere around folder renames/deletes/changes or something. The bugs seem to go away when you check everything in and try again after the folder change has been saved to source control. I have hit this issue a dozen times this week but don't know exactly what the scenarios are. It's quite frustrating.

1
  • Unfortunately for me, in my case I don't have a folder change to check in. Everything has been checked in and I got a fresh copy to see if that would help, which it did not :(
    – Peter
    Commented May 13, 2010 at 3:08
1

I figured it out, but it's a little strange. I had some build errors that I hadn't fixed yet, also my web.config file used to be for a 3.5 SP1 site and I upgraded the site to 4.0. Somewhere along the line the build errors and the web.config combined to form this strange weird error that apparently has nothing to do with TFS.

I figured it out by creating a new website and slowly moving over portions of my site to that new site. Things didn't go totally crazy until I moved over my web.config. So I went back and updated my web.config file so that it more closely matched the way a .Net 4 web.config should by trimming out a lot of stuff and now things are good and building fine. Thanks for the help.

Not the answer you're looking for? Browse other questions tagged or ask your own question.