I have a SSIS package, it runs fine in visual studio with BIDS, where it is developed (except for running out of memory due to 32-bit limitation).
Now, when I re-build the package, copy the dtsx to another location and ask DTEXEC to run it, I will get bombarded with log messages of this kind:
"Description: CS1056 - Unexpected character '$', ScriptMain.cs, 660, 39".
From what I have been able to find, this relates to the fact that I use string interpolation as part of some of my script tasks (C#). The C# version is set to Visual Studio C# 2015 and all scripts compile fine in visual studio.
DTEXEC does tell me that it failed to compile scripts in the package, but how come it does so, when visual studio compiles and runs it just fine?
Besides the above mentioned error, I do also get:
- "Description: CS1519 - Invalid token '.' in class, struct, or interface member declaration, PIMChannelStructureEntity.cs, 10, 42".
- "Description: CS1002 - ; expected, PIMChannelStructureEntity.cs, 10, 30".
- "Description: CS1520 - Method must have a return type, PIMChannelStructureEntity.cs, 10, 43".
For 1, 2 and 3 above I have inspected the individual scripts and there are NO compile errors or warnings. I expect that 1, 2 and 3 are symptoms of something else being wrong, as the code compiles just fine in visual studio.
The package is being run like:
/FILE "E:\packageName.dtsx" /CONNECTION connName1;"Data Source=server;User ID=username;Password=password;Initial Catalog=catalog1;Persist Security Info=True;Max Pool Size=10000;MultipleActiveResultSets=True;Connect Timeout=30;Application Name=someLongAssAutogeneratedName;" /CONNECTION connName2;"Data Source=anotherServer;User ID=anotherUsername;Password=anotherPassword;Initial Catalog=catalog2;Persist Security Info=True;Application Name=anotherLongAssAutogeneratedName;" /CHECKPOINTING OFF /REPORTING IEW /CONSOLELOG NCSMT
The package does point to the correct SQL server version.
Any and all suggestions as to what could be wrong, are very much appreciated. I am at a loss.
EDIT:
- The suggested duplicate I have already looked at, and it didn't get me any closer to a solution. This issue is in no way or shape related to TFS or build processes.
- The package is being run against a 2016 SQL server.
- 2nd line when executing: "Version 14.0.1000.169 for 64-bit"
- When running the package through DTExecUI it is validated 100% and passes. It will run but hit the same 32-bit limitation as from inside Visual Studio. Perhaps this is an issue between 32 and 64 bit runtime?
- After having replaced every occurrence of String Interpolation ($"") with the equivalent string.Format(...), the validation fails on every occurrence of ':', ';', '.' and so on, for what seems to be every line outside the Main method.