question

TimPeters-7940 avatar image
1 Vote"
TimPeters-7940 asked DavidMWilson-6808 answered

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

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ByronBarton-8512 avatar image
0 Votes"
ByronBarton-8512 answered TimPeters-7940 commented

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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks ByronBarton. Downgrading VS from 16.9 to 16.8, as per the link you provided, resolved the issue.

0 Votes 0 ·
YitzhakKhabinsky-0887 avatar image
0 Votes"
YitzhakKhabinsky-0887 answered

Hi @TimPeters-7940,

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimPeters-7940 avatar image
0 Votes"
TimPeters-7940 answered YitzhakKhabinsky-0887 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@TimPeters-7940,

Please connect with me on LinkedIn.

0 Votes 0 ·
Monalv-msft avatar image
0 Votes"
Monalv-msft answered Monalv-msft edited

Hi @TimPeters-7940 ,

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PetersT-8030 avatar image
0 Votes"
PetersT-8030 answered PetersT-8030 published

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



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jandhondt avatar image
0 Votes"
jandhondt answered

I am facing exactly the same problem "Could not find a part of the path" and it means I can no longer debug a set of existing SSIS packages with VS 2019.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ByronBarton-8512 avatar image
0 Votes"
ByronBarton-8512 answered jandhondt commented

You will find this warning from Microsoft:

"There is a regression in VS 2019 16.9 that will cause script task/component to not work properly when editing script. Please do NOT upgrade to 16.9 currently. If you have already upgraded to 16.9, please rollback to 16.8 or earlier version if you are using script task/component. VS team is working on the fix. Sorry for any inconvenience."



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the swift reply. I shall have a go at re- installing 16.8. I hope other newly developed stuff in SSIS with VS2019 16.9 will still be allright .

0 Votes 0 ·
DavidMWilson-6808 avatar image
0 Votes"
DavidMWilson-6808 answered

I just encountered this issue for the first time today when adding an older package to a project targeting 2019. (I've worked with packages targeting 2014 and 2016 recently without any issues.) I updated Visual Studio to 16.11 and the error is gone. I didn't think to check the VS version before I updated but I'm pretty sure it was 16.9. Looks like they fixed it. :)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.