How can I create a TFS 2010 team project using the SDK?

I heard that this is not possible, but I thought I was wondering here and getting the final answer. Is there a way to use the Team Foundation Server 2010 SDK to programmatically create a new project in a collection?

So far, all I have seen is to use this scripting method of the VS 2010 IDE: http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in- tfs2010.aspx . Ugly.

I cross my fingers in that there is a better way. Ideas?

+3
source share
3 answers

You can use this instead of the command line:

string log = @"C:\Builds\tfsLog.txt";
string settingsFilePath = @"C:\TeamProjects\TeamProjectSettings.xml";
var batchTeamProjectCreator = new BatchTeamProjectCreator();
var succes = batchTeamProjectCreator.BatchCreateTeamProject(settingsFilePath, out log);

you need to add a link to this dll:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.TeamFoundation.TeamExplorer.dll

You still have to use xml, but its a little more elegant.

, , .:)

, Oshry

+1

, :

  • " Microsoft Team Foundation Server 2010 Power Tools" VS2010.
  • :

\ Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\TFPT.exe createTeamProject/collection: http://vm-haitch: 8080/tfs/TestCollection/TeamProject: Project1/ProcessTemplate: "MSF Agile Software Development v5.0" /SourceControl: /: C:\Temp\TFS\Auto \/verbose/noreports/noportal

+1

, . , , - . TFS PowerTools 2010 , , XML - .

0
source

Source: https://habr.com/ru/post/1794295/


All Articles