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.
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.
- Open the SSIS solution in VS 2008
- Rightclick on the package in question and from the dropdwon menu select Get Specific Version…
- In the ‘Get’ dialog, in the Version box, select Type ‘Changeset’ and click on the button with 3 dots
- 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
- The Get window has 495 in the Changeset textbox . Click on the Get button.
- Now visual studion has loaded the file with the previous version of the package.
- Close the soloution.
- Copy the package file with windows explorer to another location, and make the copy writable.
- Open the Solution.
- Check out the package. This will get the latest version.
- Close the solution.
- Copy the writable previous version to the project folder and overwrite the latest version.
- Open the solution.
- Edit the package and check in.
No comments:
Post a Comment