How do I copy a full Data Flow Task (DFT) from one project to another if pasting the project connection manager throws the error:
At least one connection manager could not be pasted correctly.
The connection manager with the name 'MyConnMngr' could not be pasted successfully.
The connection manager could not be created.
Object reference not set to an instance of an object.
(Microsoft.DataTransformationServices.Design)
Here is the full copy of the message. The link is dead:
TITLE: Microsoft Visual Studio
------------------------------
The designer could not paste one or more connection managers.
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%C2%AE%20Visual%20Studio%C2%AE&ProdVer=15.9.28307.2094&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=PasteComponentsFailureCause_couldNotRestoreConnectionManagers&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
At least one connection manager could not be pasted correctly.
The connection manager with the name 'MyConnMngr' could not be pasted successfully.
The connection manager could not be created.
Object reference not set to an instance of an object. (Microsoft.DataTransformationServices.Design)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%C2%AE%20Visual%20Studio%C2%AE&ProdVer=15.9.28307.2094&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=RestoreConnectionManagers_AtLeastOneRestoreConnectionManagerErrorOccured&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
If it was just this connection manager that I would have to build from scratch again, I would not take the time for this question. But this error stops pasting the whole DFT, and I cannot even copy and paste any boxes step by step.
The only thing that was pasted from the whole DFT was one Flat File Connection Manager for the package. It seems as if connection managers for the project cannot be pasted. I tried it in two projects. I know that sometimes objects are still files in the project and not shown in the project explorer. Such files can block pasting new objects of the same name, or you would get a warning to replace it at least. Therefore, I pasted the DFT in a project that had not had any connection manager of that name or function before, and still, the error came up.
I work in an older SSIS version from 2016. Perhaps a younger version can deal with it, but I doubt it.
You should not copy and paste a DFT. Instead, copy the whole package, but not by copy and paste, but with the menu's "Add Existing Package":
I then got some small errors that I could fix quickly.
Error code 0xC00470A6:
There were errors while loading the package:
And then you find the DFT box with everything in it in the new project.
Mind that this only works since it does not copy the project connection managers. You cannot copy them each by each since this is not in the menu if you right click a connection manager:
Instead, you need to play a trick on SSIS:
Only by this, you can get the settings copied. If you start with the copy to the project in the Data Explorer and then try to add it, there is nothing in the menu for that. If you afterwards make a connection manager and try to rename it to that pasted one, you will only override the needed one by the new dummy, not the other way round.
After having copied the whole package, you can then pick the DFT and copy it to another package of that same project.