Microsoft – Team Foundation Server – Client – Explorer Integration

Background

As we near the end of our current project, I wanted to make sure that we have our SQL files saved away in Source Control.

And, so reached out to the Source Control group and had them create a new Team Foundation Project for us.

SQL Server Management Studio

SQL Server Management Studio is a shell of Microsoft’s flagship Integrated Development Environment, Visual Studio.  And, so one is able to integrate that IDE into Source Control.

But, I am have yet to get a good standardized approach in how to package a set of SQL files into an Application Project, Build, and Deploy it from SSMS.

Introduction

Because of my lack of education, I will resort to accomplishing the basics of creating a TFS Workspace through Explorer Shell and\on terminal.

Download Area

Depending on your version of Visual Studio, please choose the corresponding Team Explorer version.

You can use the matrix below; made out with little help from http://en.wikipedia.org/wiki/Microsoft_Visual_Studio.

SQL Server  Visual Studio Internal Version Title Link
2014 12  Team Explorer for Microsoft Visual Studio 2013 http://www.microsoft.com/en-us/download/details.aspx?id=40776
2012 11   Team Explorer for Microsoft Visual Studio 2012  http://www.microsoft.com/en-us/download/details.aspx?id=30656

It is always good to verify on your own, as well.

And, here is one way to do so:

  • Launch SQL Server Management Studio
  • Click on Help \ About
  • And, on the Microsoft SQL Server Management Studio entry, you want to not the Version Number
    • For SSMS v2014, we have v12.0.major.minor

SQL Server 2014 Management Studio

v2014

Visual Studio Team Foundation Server Server Power Tools

SQL Server  Visual Studio Internal Version Title Link
2014 12 Microsoft Visual Studio Team Foundation Server 2013 Power Tools https://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f
2012 11 Microsoft Visual Studio Team Foundation Server 2012 Power Tools https://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f

Installation

Team Explorer

Prerequisites

Mount \ Extract ISO

Team Explorer is bundled as an ISO image and so one needs an ISO Mounter such as Slysoft Virtual Clone Drive.

But, these days, I will suggest that you use 7-zip as it allows one to extract the ISO file. 7-zip is available @ http://www.7zip.org/.

The only reason why I personally might opt not to extract the files is to conserve disk space and simply access the ISO File as is.

Visual Studio Team Foundation Server Server Power Tools

Prerequisites

  • Microsoft .Net Framework v4.0

Screen Shots

Prerequisite check

Note that if you are yet to install “Visual Studio 2013” or “Visual Studio Team Explorer“, prior to attempting a Power Tools install, one will get a warning.

FeaturePrerequisitesNeeded

And, so I will advice you to install the latter prior.

Custom Setup

  • Please make sure that the following features are selected
    • Windows Shell Extensions (x64)

customSetup

Setup Completed Successfully

WindowsShellExtensionFeatures

Quick Points

  • The installation is targeted to c:\”Program files (x86)”\”Microsoft Team Foundation Server 2013 Power Tools”
  • Once the install is completed, one needs to log off and log back in; doing so ensures that the OS Desktop integration occurs

Tasks

List Workspaces

Console

It does not appear that one is able to get a generalized view of all Workspace projects from the console.

Command Line


"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspaces

Output:

listWorkspaces - Cleanedup

Create Workspace

Windows Explorer

Could not find a way to create a Workspace via MS Windows Explorer and so had to go command line.

Command Line

Syntax:


 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspace -new workspacename -collection:TeamProjectCollectionUrl

Sample:


 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspace -new salesApp -collection:http://tfs.mycorp.com:8080/tfs/collection2010

Output ( Minimal View ):

AddWorkspaceMinimal

Output ( Max View ):

JoeNicholsAdvanced-cleaned

Explanation:

  • Please read more about Permissions (Public work-spaces, etc) in the Reference section
  • Also note the “Local Folder” and specify accordingly

Once one presses OK on the “Add Workspace” screen, the TFS Client connects to the TFS Server, attaches to the project, creates the local folder, and detects whether there are changes between the local sub-system files and the server.

In case there are, the user is asked whether the latest files should be downloaded.

WorkSpaceModified

Delete Workspace

Hopefully one will actually work the project and not rush to remove it right away.  But, as we merely created an extra Workspace for the benefit of this post, here are the steps towards removing the project.

Command Line

Syntax:


 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspace -delete workspacename -collection:TeamProjectCollectionUrl

Sample:


 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspace -delete JohnNichols -collection:http://tfs.mycorp.com:8080/tfs/collection2010

Output:


"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspace -delete JoeNichols -collection:http://tfs.tfslab.com:8080/tfs/collection2010
A deleted workspace cannot be recovered.
Workspace 'JoeNichols' on server 'http://tfs.tfslab.com:8080/tfs/collection2010 has 0 pending change(s).
Are you sure you want to delete the workspace? (Yes/No) Yes

Listening

Listening to an old friend, Joe Nichols.

Summary

Obviously there is more to TFS.

In subsequent posts we hopefully will touch on some of them.

It is a few hours before the New Year in my little corner of the World and I will like to say “I will be out painting the Town …”, but just like Joe Nichols, I will be lying.

References

TFS

Concepts

Workspaces

SQL Server Management Studio and TFS

Public Workspaces

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s