In my SSIS project, there are lots of packages used the similar code and logic. So I just copied the component and changed the things that need to be changed. Then I got a very weird error :
at UserComponent.PrimeOutput(Int32 Outputs, Int32 OutputIDs, PipelineBuffer Buffers, OutputNameMap OutputMap)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32 outputIDs, PipelineBuffer buffers)
After lots of search and investigation, I realized it’s SSIS component copy issue.
I followed Stefan’s steps and try to fix it. But it’s not working for mine. I recreated a new script component from the scratch.
There is ticket in Visual Studio Developer community as well, the last update at 06/02/2020 mentioned it’s a VS bug and still working on it.