Don
Don

Reputation: 1572

SSIS adding an existed package actually added an identical copy

I try to add an existed package to a SSIS project using Visual Studio. But it turns out the tool copies the package to a new package and name it as original name plus an incremented number first and then attach the package to the project. I know I miss some settings. But I could not find out what prevents the original package from attached. Anyone encountered the same problem. Thanks!

Upvotes: 13

Views: 21955

Answers (3)

dev_etter
dev_etter

Reputation: 1186

The method you need to use to get around the "Add Existing Package" behavior is pretty simple. Just right-click on the project and select "Add Existing Item." Doing it this way just attaches the DTSX to the project without renaming or creating a copy.

Upvotes: 21

sherwoac
sherwoac

Reputation: 11

The dtsx always gets copied into the solution folder, you're right, this has to be a bug.

The solution is to edit the .dtproj file within the solution folder such that the DTSPackages/DtsPackage/fullpath tag, reflects the location of the original dtsx package.

Upvotes: 1

William Salzman
William Salzman

Reputation: 6446

What is happening here is most likely that you have copied a package manually into the project directory and then tried to add it to the existing project. BIDS (Visual Studio) assumes you are copying from a different location, takes the name and copies the project into your directory, finds an existing copy, and renames the new one to prevent name collision.

Workaround #1 Before adding an existing object, move it to a temp directory outside of your project space. Choose Add Existing package and copy into your project. Package will have correct name.

Workaround #2 After original scenario, delete the original from disk, then rename the copy from within BIDS (Visual Studio). This will rename your package to the correct name.

Upvotes: 19

Related Questions