/jcarver

I have a TFS and I'm trying to now allow users to easily add their own records to TFS without having to worry about some of the Admin level details. So I am trying to create a Windows form that connects to the TFS and will add a work item when given some parameters retrieved from a database. Does anyone know how to at least connect to TFS using a windows form

Thanks in advance,

/jcarver


Re: Team Foundation Server - Work Item Tracking How to Connect and add a work item

kunalm

hi jcarver ,

you have to add certain references to you windows form :

using Microsoft.TeamFoundation.Client;

using Microsoft.TeamFoundation.Server;

using Microsoft.TeamFoundation.Common;

using Microsoft.TeamFoundation.Proxy;

you can find this references in Drive :\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

private TeamFoundationServer tfs;

private string _teamFoundationServerName;

private void ConnectTFS(DomainProjectPicker projectPicker)

{

_teamFoundationServerName = projectPicker.SelectedServer.ToString();

tfs = TeamFoundationServerFactory.GetServer(_teamFoundationServerName);

tfs.Authenticate();

}

i hope this helps you

Thanks and regards

Kunal





Re: Team Foundation Server - Work Item Tracking How to Connect and add a work item

/jcarver

Ok, I added all of references, but I still don't seem to have the reference of the TeamFoundationServer, TeamFoundationServerFactory, or DomainProjectPicker. They don't seem to exist for me, any ideas Thanks for the help,

/jcarver




Re: Team Foundation Server - Work Item Tracking How to Connect and add a work item

Hua Chen - MSFT

Hello /jcarver,

Class TeamFoundationServer and TeamFoundationServerFactory are in Microsoft.TeamFoundation.Client namespace defined in the Microsoft.TeamFoundation.Client Assembly.

Class DomainProjectPicker is in Namespace: Microsoft.TeamFoundation.Proxy and Assembly: Microsoft.TeamFoundation

Have you installed the VS 2005 SDK

Here is the download link:

http://www.microsoft.com/downloads/details.aspx FamilyID=51a5c65b-c020-4e08-8ac0-3eb9c06996f4&DisplayLang=en

If you have installed this SDK.

You can find some samples in it.

Click Start--- Program --- VisualStudio 2005 SDK-- 2007.2 --- VisualStudio 2005 SDK

There is a WorkItemOM sample solution you can find which demonstrates WorkItem Object Model.

Good luck






Re: Team Foundation Server - Work Item Tracking How to Connect and add a work item

kunalm

you can found these references in drive(D or C):\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies. and you only have to add three references through solution explorer

using Microsoft.TeamFoundation.Client;

using Microsoft.TeamFoundation.Server;

using Microsoft.TeamFoundation.Common;

and for DomainProjectPicker u have to add the reference in console itself

using Microsoft.TeamFoundation.Proxy;

I hope this helps

Thanks and Regards

Kunal