visual-studio SSIS 添加现有包实际上添加了相同的副本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3909387/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:35:46  来源:igfitidea点击:

SSIS adding an existed package actually added an identical copy

visual-studiossis

提问by Don

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!

我尝试使用 Visual Studio 将现有包添加到 SSIS 项目。但事实证明,该工具将包复制到一个新包中,并将其命名为原始名称加上一个递增的数字,然后将包附加到项目中。我知道我错过了一些设置。但我无法找出是什么阻止了原始包裹的附加。任何人都遇到过同样的问题。谢谢!

回答by William Salzman

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.

这里发生的情况很可能是您手动将包复制到项目目录中,然后尝试将其添加到现有项目中。BIDS (Visual Studio) 假定您是从不同位置复制,采用名称并将项目复制到您的目录中,找到现有副本,并重命名新副本以防止名称冲突。

Workaround #1Before 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.

解决方法 #1在添加现有对象之前,将其移动到项目空间之外的临时目录。选择添加现有包并复制到您的项目中。包将具有正确的名称。

Workaround #2After 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在原始场景之后,从磁盘中删除原始版本,然后从 BIDS (Visual Studio) 中重命名副本。这会将您的包重命名为正确的名称。

回答by dev_etter

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

您需要用来绕过“添加现有包”行为的方法非常简单。只需右键单击该项目并选择“添加现有项目”。这样做只是将 DTSX 附加到项目,而无需重命名或创建副本。

回答by sherwoac

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

dtsx 总是被复制到解决方案文件夹中,你是对的,这一定是一个错误。

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.

解决方案是编辑解决方案文件夹中的 .dtproj 文件,使 DTSPackages/DtsPackage/fullpath 标记反映原始 dtsx 包的位置。