Monday, March 04, 2013

Rollback VS 2008 SSIS package changeset in TFS

Problem

For some reason a package that was changed last week gave a script task error validation error. The package had been tested and was workiing fine. Only after the package had been chaecked into TFS last week and reopend with VS2008 this monday did the the Script task produce validation errors. Trying to edit and open the C# script code failed.

Solution

Since the change in the script task was minor and well documented I decided to revert to the previous version in TFS. But rolling back in TFS with VS 2008 does not seem as simple like it used to be with Visual SourceSafe.

There is an option in Visual Studio (Tools / Options / Source control / Visual Studio Team Foundation) that says ‘Get latest version of item on check out’. The option on my machine was turned of, so one would think it might be possible to use this feature to get a previous version of the file during check out. But I could not find a menu choice like that.

image

Therefore I abanonded looking further into this problem and opted for a pragmatic solution:

Get previous version of package – copy to separate folder – check out, this will get the latest version again. Close VS 2008  and overwrite the checked out version with the copy of the previous version. Load VS 2008 and modify package, check in.

  1. Open the SSIS solution in VS 2008
  2. Rightclick on the package in question and from the dropdwon menu select Get Specific Version…
    image
  3. In the ‘Get’ dialog, in the Version box, select Type ‘Changeset’ and click on the button with 3 dots
    image
  4. In the find changesets dialog window, set Ragne to ‘All changes’ and click on the Find button. The results are shown in the listbow at the bottom. Select the previous changeset (2nd in the list) and click OK. In my examplet this is set 495
    image
  5. The Get window has 495 in the Changeset textbox . Click on the Get button.
  6. Now visual studion has loaded the file with the previous version of the package.
  7. Close the soloution.
  8. Copy the package file with windows explorer to another location, and make the copy writable.
  9. Open the Solution.
  10. Check out the package. This will get the latest version.
  11. Close the solution.
  12. Copy the writable previous version to the project folder and overwrite the latest version.
  13. Open the solution.
  14. Edit the package and check in.

No comments: