Part of path could not be found when building VB script in SSIS Script Task script editor

Tim Peters 26 Reputation points
2021-03-05T17:29:47.467+00:00

I've upgraded to Visual Studio 2019 and added SQL Server Data Tools (SSIS, SSAS, and SSRS project types). I'm attempting to migrate an integration services package created with Visual Studio Tools for Applications 2013. In the package designer, once I save the script for a Script Task and click OK in the Script Task Editor, I get an error that says "Scripts contained in the package have compilation errors. Do you want to save changes?". Clicking Yes leave me with a broker Script Task ("The binary code for the script is not found. If I go back into the VB code (Open Script Task Editor, click Edit Script) and do a Build within the VSTA editor, I get this error: "Could not find a part of the path 'C:\Users\peterst\AppData\Local\Temp\Vsta\5c962ed7d2234dddb94efc1a5f4c75de_out'." I assume that's the basis of the compilation errors message. However, I don't see anywhere within Visual Studio that I have any control over where is it storing source code, nor in how it is building a path to same. This seems truly ridiculous. Any help is greatly appreciated.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,508 questions
0 comments No comments
{count} vote

Accepted answer
  1. Byron Barton 76 Reputation points
    2021-03-08T14:47:13.493+00:00

    I started getting the same error recently. Nothing in the script code changed, but there was a VS update. I am getting this error for every single script regardless of platform, framework, or any other setting.


7 additional answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 25,726 Reputation points
    2021-03-05T18:41:47.02+00:00

    Hi @Tim Peters ,

    VS2019 needs a different extension for SSIS projects. It is no more SSDT.
    It has a different name: SQL Server Integration Services Projects.

    You can get it here: SQL Server Integration Services Projects

    0 comments No comments

  2. Tim Peters 26 Reputation points
    2021-03-05T18:54:30.253+00:00

    Hi YitzhakKhabinsky,

    I'm aware that Visual Studio 2019 uses the extension SQL Server Integration Services Project. That is what I'm using; that is, I installed that extension and have created an Integration Services project. I'm afraid that does not resolve the problem with the Visual Studio Tools for Applications error. Thanks all the same.


  3. Monalv-MSFT 5,896 Reputation points
    2021-03-08T09:55:16.62+00:00

    Hi @Tim Peters ,

    Could you please share the example script in the Script Task?

    Please use Try catch / Error Handling to set Script Task Debugging.

    Please refer to Script Task Debugging in SQL Server Integration Services (SSIS) and Logging in the Script Task.

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. PetersT 1 Reputation point
    2021-03-08T14:09:10.797+00:00

    Hi @Monalv-MSFT

    I'm afraid I don't quite understand your suggestions. The code, which I've attached, can't be debugged because it can't be compiled. When I try to Build it in VSTA, I get the error in my original post; that is, it states that part of the path to the source file can't be found. It's as though Visual Studio Tools for Applications is capable of choosing a location to which to write the source code, but unable to then read the code from the exact same location in order to compile it.75466-ssis-script-task-for-qna-post.txt

    0 comments No comments