Archive for category TFS

Connecting Visual Studio 2008 to TFS 2010

We have an environment that requires both Visual Studio 2008 and Visual Studio 2010. Our repository is in Team Foundation Server 2010, and that holds both 2008 and 2010 data.

VS 2010 was working fine, but I could not get VS 2008 to connect to TFS. Looking for a solution, I saw blogs that mentioned there should be a “Team” menu, and a “Connect to Team Foundation Server” option under the Tools menu, among other things. I didn’t have that. I had installed Team System 2010 Team Explorer, but it wasn’t working.

So I finally figured out (i.e. found an article) that I needed Visual Studio Team System 2008 Team Explorer to get it working.  Hopefully, I can save someone that “duh” moment by pointing it out.


Leave a comment

TFS build process – Activity “CopyFile” must be used in the context of an AgentScope

My task was to create an Activity object to perform some business logic during a build in TFS.  While creating this Activity (using the CodeActivity template), I encountered two problems.

First, my custom activities wouldn’t work after I went through the long process of registering them properly for the TFS build process to use them, which I’ll be detailing in depth in a post later this week.

What I mean by wouldn’t work is that I would run my build, it would run successfully, but the expected action – in this case, copying a file to a remote share – wouldn’t occur. No errors, no file, nothing.

After lots of troubleshooting and several hours of research, I thought that maybe it was because my Activity was in the wrong location in the build template. I moved it to the top of the template, and my build failed with this message:

Activity “CopyFile” must be used in the context of an AgentScope.

Ah, an actual, honest-to-goodness hint of what the problem could be. I moved the Activity to a location inside a “Run On Agent” process, then ran the build again. Success! The build worked and the file was copied.

So the lesson is, if you are modifying your Team Foundation Server build process by adding a custom Activity, make sure you put the Activity in the right spot!

1 Comment