Showing posts with label TFS. Show all posts
Showing posts with label TFS. Show all posts

Sunday, 6 December 2015

Disable multiple checkout in TFS

Case
I tried disabling the TFS multiple checkout for an SSIS project, but my collegue and me can still check out the same SSIS package at the same time causing all kinds of issues when checking in the changed package. How can I disable multiple checkout?
Disable multiple checkout in TFS

















Solution
You need to check your workspaces. If one of you is still using a local workspace then you can still checkout the same package multiple times.

Go to the Source Control Explorer in Visual Studio. You can find the link in the Team Explorer pane. Then (1) open the Workspace selectbox and choose Workspaces... In the Manage Workspaces window click (2) on the Edit... button and then (3) on the Advanced >> button.
Edit Workspace














In the advanced option change the location from Local to Server and click on OK and one more time in the next window.
Set workspace location to server




















If you both use the workspace on the server then you will get an message that the SSIS package is checked out by user xxx.
Package checked out by colleague Menno














Now you only need to remember to don't keep the project or solution checked out otherwise no one else can add (, delete or rename) projects/packages/connection managers/etc. When adding a new package the project will be checked out. To prevent long check outs, you should first give the new/empty package its correct name and then check-in everything (the project and the new/empty package). Only then you can start building the new package!
Also see MSND for more information about local and server workspaces.

Saturday, 1 March 2014

SSIS 2012 with Team Foundation Server - Part I

Case
Team Foundation Server (TFS) is a handy tool when you work with multiple people on the same visual studio project. You can check out the files you work on and you still have the previous versions if you mess up. How do you get TFS working for SSIS 2012?

Solution
SSIS 2012 uses SQL Server Data Tools for Visual Studio 2010 for development, but you can also use Visual Studio 2012. They are called Visual Studio 2010/2012 Shell. Both have a different version of Team Explorer:

Visual Studio 2010: Microsoft Visual Studio Team Explorer 2010
Visual Studio 2012: Team Explorer for Microsoft Visual Studio 2012

This blog post shows how to install Team Explorer and shows how to setup Visual Studio to use TFS for SSIS. I have tested these for TFS 2010 and 2012. The SQL Server version that I used was Developer Edition 11.0.2100.60 RTM and VS2010 Shell 10.0.40219 SP1 and VS2012 Shell 11.0.50727.1 RTM. For SSIS 2008 (R2) and VS2008 Shell see this earlier blogpost. If your boss didn't purchase TFS then you could also get a free online TFS workspace.

In Part I covers:
A) Install Team Explorer for Visual Studio 2010
B) Install Team Explorer for Visual Studio 2012
C) Setup Visual Studio to use TFS

In Part II you will read:
D) Adjusting development process




A) Install Team Explorer for Visual Studio 2010
Use the 2010 download link above. It's an ISO file. Mount or extract the iso file and execute the setup file. Next follow the setup screens. There are no real options to customize the installation: Next, Accept, Next, Install, Finish.
























Reinstall Service Pack 1
If you have Service Pack 1 installed for Visual Studio 2010, then you have to reinstall SP1 when you finish installing Team Explorer. Else you could get an error like this when starting SSDT or SSMS:
Only some of the Microsoft Visual Studio 2010 products
on this computer have been upgraded to Service Pack 1.
None will work correctly until all have been upgraded.
















You can download 'Microsoft Visual Studio 2010 Service Pack 1 (Installer)' here: http://www.microsoft.com/en-us/download/details.aspx?id=23691


B) Install Team Explorer for Visual Studio 2012
Use the 2012 download link above. It's an ISO file or an exe. Execute the setup file. Next follow the setup screens. There are no options to customize the installation: Accept, Install and launch VS2012.






























C) Setup Visual Studio to use TFS
For both versions of Visual Studio setting up TFS is the same.
In the Team-menu choose Connect to TFS





















If you have updated Visual Studio 2012, then this first step will open the Team Explorer pane on the right side. There you can click on the Connect link to open the window in the next screenshot.

Click on Servers-button to add a TFS server

Click on Add-button to add a TFS server

Add the tfs URL and choose between http and https

Click the OK-button and wait

Enter your credentials

Click the Close-button

Select the TFS project


Now you have the Team Explorer pane available




















































































































































In the second part you read what's next.


SSIS 2012 with Team Foundation Server - Part II

Case
I have installed Team Explorer and setup Visual Studio to use it. What's next?

Solution
In Part I you read:
A) Install Team Explorer for Visual Studio 2010
B) Install Team Explorer for Visual Studio 2012
C) Setup Visual Studio to use TFS

This second part covers:
D) Adjusting development process



D) Adjusting development process
Because you can now work with multiple developers on the same project, you have to make some arrangements with your fellow developers, like:

1) Get latest version project
Get the latest version of the project on a regular basis. Otherwise you will miss new packages, project connection managers and project parameters. Do this for example each morning or before you start developing. There is also an option in Visual Studio to automatically get the latest version of the solution when opening it.
Get everything when a solution or project is opened.

















2) Get latest version package
Get the latest version of a package before editing it. There is also an option in Visual Studio to automatically get the latest version of a package when checking it out.
Get latest version of item on check out.

















3) Adding new package to project
When you add a new package to the project, the project self will be checked out. First first rename the new package, save it and then check in the project and the new (empty/clean) package. Otherwise your fellow developers cannot change project properties or add new packages.
Adding new package will check out the project























4) Disable multiple check out
Working together on the same file at the same time is nearly impossible, because it's hard to merge the XML of two versions of a package. Therefore you should disable multiple check out in TFS or check out your package exclusively (not the default in TFS).
In Team-menu click Team Project Settings, Source Control

Uncheck the multiple checkout box






































5) Don't check in faulty packages
Try not to check in package that doesn't work. Especially when you work with the project deployment model, with which you can only deploy the complete project.
Don't check in faulty packages



















6) No large/complex packages
Don’t make packages to large/complex. Divide the functionality over multiple smaller packages, because you can’t work with multiple developers on the same large package at the same time.

7) Sensitive data
The default Package Protection Level is EncryptSensitiveWithUserKey. This will encrypt passwords and other sensitive data in the package with the username of the developer. Because your colleagues will probably have different usernames they can't edit or execute packages that you made without re-entering all sensitive package data.
The easiest way to overcome this, is to use DontSaveSensitive as Package Protection Level in combination with Package Configurations. Then all the sensitive data will be stored in the configuration table or file and when you open the package all this data will be retrieved from the configuration table or file.
If you're using the Project Deployment Model in combination with sensitive parameters instead of Package Configuration, then the easiest workaround is to use EncryptAllWithPassword or EncryptSensitiveWithPassword with a password that is known within the developmentteam.

8) Development standards
When you're developing with multiple people (or someone else is going to maintain your work) then it's good to have some Development Best Practices like using prefixes for tasks and transformations or using templates. This makes it easier to transfer work and to collaborate as a team.

9) Comments
When you check in a package, it's very useful to add a meaningful description of the change. This makes it easier to track history.
Check in comments

















10) Branching, Labeling and building
Beside versioning and checking in/out packages there are more interesting functions in TFS that are probably more common in C# and VB.Net programming, but worth checking out. Here are some interesting links about TFS and SSIS:

 

 



Tuesday, 10 July 2012

Disable multiple checkout for SSIS 2008 R2 and before

Case
A while ago I did a post on how to get SSIS 2008 working with Team Foundation Server (TFS). But beware, you shouldn't work with two developers on one package at the same time! That will cause problems with for example lineage id's. Merging two versions will be nearly impossible. So how do you prevent that?

Solution
Go to the Team Explorer pane in Visual Studio (BIDS). Right click on the solution and select Team Project Settings and then Source Control. Now you can uncheck the checkbox for Enable multiple check-out.  
Disable multiple check-out for SSIS 2008
























Note: SSIS 2012 seems to work better with merging.

Saturday, 7 April 2012

SSIS 2008 with Team Foundation Server 2010

Case
A lot of my clients are still working with SSIS 2008 (R2), but already have Team Foundation Server 2010 for source control. How can you connect to TFS 2010 with BIDS/Visual Studio 2008?

Solution
Although this blog is about SSIS, this solution works for all kinds of Visual Studio 2008 projects.

1) Install Team Explorer
First you need to install "Visual Studio Team System 2008 Team Explorer" which is a simplified Visual Studio Team System 2008 environment used solely to access Team Foundation Server services. You can download it here.
Next, Next, Finish























2) Install VS 2008 SP1
Secondly install "Microsoft Visual Studio 2008 Service Pack 1" (even if it was already installed before step 1). You can download it here.
Next, Next, Finish
























3) Install Team System 2008 SP1
Thirdly install "Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010", which you can download here. This Service Pack let's you connect to TFS 2010.
Next, Next, Finish
























4) Connect to Team Foundation Server in BIDS.
a) In the Tools menu click "Connect to Team Foundation Server"
Connect to Team Foundation Server



















b) In the next screen click on "Servers..."
Connect to Team Foundation Server, Servers...



















c) And in the next screen click on "Add..."
Connect to Team Foundation Server, Servers..., Add...

















d) If you connect over http then your url should look something like this (don't use port number and protocol):
Connect to Team Foundation Server over http















And if you connect over https then you url should look something like this (don't use port number and protocol):
Connect to Team Foundation Server over https














Note: If you get this error "TF30335: The server name cannot contain the characters '/' or ':', or start with 'http://' or 'https://'. If the server name is an IPv6 address, it can contain the character ':' only if the full name is enclosed by square brackets.", while trying to connect to Team Foundation Server 2010 then you probably forgot the third step of this post.
Team Foundation Server 2010
















e) Click "OK" to add the server. Depending on the environment/tfs settings you now have to enter your username and password. After this step your tfs server will be added to Visual Studio/BIDS. Select it and click "Close"
Connect to Team Foundation Server, Servers..., Close


















f) Now you can select one or more projects.
Available TFS projects




















g) And they are also available via the Team Explorer / Source Control Explorer so you can open an existing SSIS project.
Team Explorer / Source Control Explorer















Or you can add a new SSIS project to source control.















Note: Disable multiple check-out!
Related Posts Plugin for WordPress, Blogger...