SSIS Script transform package won't compile when deployed to dev [Visual Studio 2017] I have visual studio 2017.

I have a script transform that I can run locally just fine, however when I deploy to the  Integration Services Catalog on the dev server and run it, it fails with the following error:


  'package name':Error: Failed to compiled scripts contained in the
  package. Open the package in the SSIS Designer and resolve the
  following compilation errors.


So, when I remote into the dev and rebuild the package, it will work fine on the next execution.

I thought this might be a reference issue but after reinstalling Visual studio 2017 and SSDT the references are an exact match on both machines.

What could be the issue for this?
You need to make sure the package in Visual Studio has been created with the correct target SQL Version you are deploying to.
In Visual Studio right click on the project name and select properties.  Under the Configuration Properties -&gt; General menu you will see the TargetServerVersion.  This must match the SQL version you are deploying to.
Once changed, build and deploy the packages again.