Welcome to Team System Rocks Sign in | Join | Help

Mickey Gousset

My Journey Into Team System
(Add me to your Live Messenger at mickey_gousset@hotmail.com)

<July 2005>
SuMoTuWeThFrSa
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

Post Categories

News

ProTFS Book Cover

Navigation

Awards

Links-O-Interest

Syndication

Adding Project To Source Control, Creating Tasks
Covered In This Post (Not Necessarily In This Order):
  • Adding A Project To Source Control
  • Checking Items Into Team System
  • Creating A Task
  • Modifying Source Control Settings

Previous Posts That Tie Into This One:

I'm building off of the Team Project that I created in my last post. Also, I am going to be following, kind of loosely, the MSDN Article "A Unit Testing Walkthrough with Visual Studio Team Test". I'll be adding and trying some things that are not mentioned in the article.

I boot up my VPC, log in, and start VS2005. I'm connected to Team Explorer, and can see the Team Project, VSTSDemo1, that I created yesterday. Now I'm going to create a new Visual C# Class Library project.

I select File->New->Project, which opens the New Project Window:

New Project Window

The "Add to Source Control" checked box was initially unchecked, but I checked it, to add it to my Team Project. I named the project VSTSDemo1 (yes, I know, it’s the same name as my Team Project. I possibly should have used something else, but too late now!). I left the location as the default. The solution name defaulted to what I typed into the Project Name, in this case, VSTSDemo1. I left the "Create Directory For Solution" checkbox checked, and clicked ok.

Uh-Oh! I received an error message stating "No Team Projects are available". But the solution and the class library project did create successfully. I switch to the Solution Explorer, right-click on the project name, and select "Add Solution To Source Control". I received the same error message, "No Team Projects are available". Weird.

I switch over to the Team Explorer. I right-click on the Team Project VSTSDemo1->Team Project Settings->Source Control… I get the following error message: "There is no team project name 'VSTSDemo1' in the repository'.

Have you figured out what I did wrong yet?

In the Team Explorer, I double-click on the Version Control file located under the VSTSDemo1 Team Project. A "Configure Version Control" window appears, saying "This project has not had source control configured. Create the Folder?". DUH! If you'll remember, when I created this project, I told it not to create the version control folder at this time. Therefore, I had not configured version control for the project yet. I clicked Yes, and it configured the source control for my Team Project.

Back in the Solution Explorer, I right-click on the project, and select "Add To Source Control". This opens the "Add Solution to Source Control" window:

Add Solution VSTSDemo1 to Source Control Window

I took the defaults and clicked OK. My solution was added into source control. Here is how my IDE looks after doing this:

IDE After Adding Solution To Source Control

In the Solution Explorer, notice the "+" signs beside the files, showing files waiting to be checked in. I believe the "+" also indicated these are new files which are not in source control at this time. In the Pending Checkout window at the bottom of the IDE, you can see some of the files waiting to be checked in.

In the Pending Checkin window, I added the following comment: "Initially adding project to source control" and click the Check In button. This checks in all the files in the Pending Checkin window. Currently, I don't have any check-in policies in place, meaning there are no restrictions on checking files in, so everything goes smoothly. Here is what the IDE looks like after I have checked the files in:

IDE After Adding Solution To Source Control

Notice the icon beside the files in the Solution Explorer has changed from a "+" to a Blue Lock.

Next, I decide I'm going to create a task for myself, for building my LogonInfo class. In the IDE, I select Team->Add Work Item Task. This opens the "New Task 1" window as a tab in the IDE. For Title, I enter "Build Stub Of LogonInfo Class". I select "Development" as the Discipline. I set the Rank to "1". In the Summary box, I enter "Build Stub Of LogonInfo Class". In the Detailed Description, I enter "Build Stub Of the class, to flesh out later". This image shows what the tab looks like, before I save it:

New Task Window

I click the Save icon, and the tab header changes from New Task 1, to Task Number 28. I close out of the task.

Now I'm going to modify my source control settings, to set some check-in policies. I go back into Team Explorer, right-click on the VSTSDemo1 Team Project and select Team Project Settings->Source Control. This opens the Source Control Settings window:

Source Control Settings

I click on the Checkin Policy tab. Currently there are no policies Active. I click the "New" button, to set a policy. This opens the "Create New Checkin Policy" window. Currently there are four options:

  • Clean Build - This policy requires that code is error clean before check-in.
  • Code analysis - This policy requires that code analysis is run before check-in.
  • Testing Policy - Run check-in tests before check-in.
  • Work Items - Require that one or more work items be associated with every checkin.

I select "Work Items" and click OK. The "Work Item Policy Configuration" window opens, asking me to "Enter instructions to be displayed to users who do not have this policy installed on their system". I enter "Associate check in code with work item." and click OK.

The Checkin Policy tab now looks like this:

Checkin Policy Tab After Adding Policy

Notice the Enable and Disable buttons on this tab. If I select the policy and click Disable, the policy now appears in italics, indicating it is disabled. I can click the Enable button to enable the policy again.

I leave the Checkin Notes blank for the time being, and click OK to close the Source Control Settings window.

Let's recap: We've added our initial project to source control, we've create a task to create a stub class, and we've modified our checkin policy, so that anything checked in has to be associated with a work item. Now its time to start building the LogonInfo class.

In the Solution Explorer, I right-clicked on Class1.cs and selected Rename. I changed the name to LogonInfo.cs. Here is how the IDE looks after I've done that:

b>Checkin Policy Tab After Adding Policy

The file has a red check mark next to it, indicating that this file has been checked out. Visual Studio checked it out for me automatically when I made a change to it, in this case, renaming the file.

I'm done for the day, so I'm going to close out of the IDE and shut down my VPC. Notice I have kept the LogonInfo.cs file checked out.

Published Tuesday, July 12, 2005 3:02 AM by mickey_gousset

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Homesteading a Team System Community @ Thursday, July 14, 2005 2:01 AM

It’s now official – the Team System community site is up and running!

Thanks to Chris Menegay, Mickey...

Rob Caron's Blog

# Homesteading a Team System Community @ Thursday, July 14, 2005 2:07 AM

It’s now official – the Team System community site is up and running!

Thanks to Chris Menegay, Mickey...

Rob Caron's Blog

# Homesteading a Team System Community @ Thursday, July 14, 2005 2:10 AM

It’s now official – the Team System community site is up and running!

Thanks to Chris Menegay, Mickey...

Rob Caron's Blog

# Homesteading a Team System Community @ Thursday, July 14, 2005 2:12 AM

It’s now official – the Team System community site is up and running!
TeamSystemRocks.comThanks to Chris...

Rob Caron's Blog

# Homesteading a Team System Community @ Thursday, July 14, 2005 3:39 AM

It’s now official – the Team System community site is up and running!
TeamSystemRocks.com
Thanks to...

Rob Caron's Blog

What do you think?

(required) 
required 
(required) 
Powered by Community Server, by Telligent Systems