SSIS - “从项目中排除”之后,如何重新包含?
通过选择“项目”->“从项目中排除”从项目中排除某个包后,以后如何“重新包含”它?
我以为是“项目”->“添加现有包”,但这会添加该包的副本。
After I've excluded a package from a project by choosing Project->Exclude From Project, how do I 're-include' it later?
I thought it was Project->Add Existing Package, but that adds a copy of the package.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这非常简单,
如果是 Visual Studio 的旧版本(例如 2012),
只需右键单击文件夹 >添加>现有项目>选择已排除的文件
如果是旧版本的 Visual Studio,例如 2008,
右键单击该文件夹 >添加>包含在项目中
It's very easy ,
if it's old version of Visual Studio like 2012 ,
just Right Click on the folder > Add > Existing Item > choose the file which has been excluded
if it's old version of Visual Studio like 2008 ,
Right Click on the folder > Add > Include in Project
在 Visual Studio 2015 中,我发现可以通过右键单击项目并选择“添加 | 重新包含包”来重新包含包。现有项目...(不是现有包)。
这没有任何意义,但确实有效。我想在其他版本的VS中也会有同样的效果。
In Visual Studio 2015, I have found that I can re-include packages by right-clicking on the project and choosing
Add | Existing Item...
(not Existing Package).It makes no sense, but it works. I guess it will work the same in other versions of VS.
根据文档,SSIS 将复制现有包并将新副本放入项目的文件夹位置。但是,如果您的包裹已位于此位置,则只需打开包裹即可。由于您排除了该包,因此再次包含它应该可以正常工作,而无需复制它。然而,我注意到的事情是你没有提到出现错误。通常,如果您制作副本并将其放置在与原始副本相同的位置,则会出现错误。最有可能的是您在“添加现有包”阶段重命名包,或者您的包不在正确的位置。
如果您的包被复制为新名称,我发现一些迹象表明这可能是一个错误。解决方法似乎是删除原始副本并重命名新副本。它并不漂亮,但它似乎是您最好的选择。
According to the documentation, SSIS will copy your existing package and place the new copy into your project's folder location. However, if your package is already in this location, it is supposed to just open the package. Since you excluded the package, including it again should work fine without it making a copy of it. The thing I notice, however, is that you don't mention getting an error. Normally you would get an error if you were making a copy and it was being placed in the same location as the original. Most like either you are renaming the package during the "Add Existing Package" stage, or your package isn't in the correct location.
If your package is getting copied with a new name, I have found some indication that this might be a bug. The work-around seems to be to then delete the original and rename the new copy. It isn't pretty but it seems to be your best option.
答案是你不能只是“包含”一个包。它更像是一个生成副本的导入...如果包已经存在,它会在包的名称中添加一个 (1)。
这是
SQL Server 2008 R2
附带的SQL Server Business Intelligence Development Studio
的功能。没有多大意义,但我确信他们在未来的 BIDS 版本中修复了这个问题The answer is that you cant just "include" a package. Its more of an import which makes a copy... if the package already exists it adds a (1) to the name of the package.
This is the functionality for
SQL Server Business Intelligence Development Studio
that comes withSQL server 2008 R2
. Doesn't make much sense but Im sure they fixed that in futureBIDS
releases