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!
问题:
回答1:
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.
回答2:
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.
回答3:
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.