Search code examples
c#ssisbids

Any reason why a try catch exception would report a file path wrongly in SSIS?


So I have this SSIS package that has a script task that is copying files to a destination and then putting their data into C# data structures to parse later. However, it runs through the first file and then suddenly I get this exception from a try catch in my main method stating: Error: 0x12 at Copy xxx Files to New Destination, there was an exception :< which said: : Could not find file 'C:\Program Files\Microsoft SQL Server\130\DTS\binn\xxx370xxxxx_xxx.rpt'.

the thing that caught my eye is that the file path changed from a different place, I don't store anything in the sql server binn folder...

Question:

Could the file path it's trying to read from not be the Bin file and that exception is reporting this folder because of some underlying reason,

in addition

Have any good advice for debugging a broken package with C# script tasks?
I am new to this project and don't have much to lean on for figuring it out and debugging C# code in BIDS is seemingly very not intuitive. (doesn't hit breakpoints, can't step through my c# code.)


Solution

  • Posting this as proposed answer, said below by Martin Smith:

    It won't be making it up. Your code is trying to find a file there. I would imagine that C:\Program Files\Microsoft SQL Server\130\DTS\binn is a default working folder location and somewhere you are just using a file name instead of a full path.