Hi I am executing a VB script using script control in c#. If it is a standalone script then it works fine for me by using the below code.
ScriptControl SC = new ScriptControl();
SC.Language = ScriptType;
SC.AddObject("Repository", RP);
SC.AddCode(scriptcontents);
Object[] runobject = { };
string result = SC.Run(ScriptName, runobject);
But when i tried to run a VBScript that contains reference of other scripts then its not executing in the script control and throws error. Referencing other scripts in a script by
!INC Local Scripts.Constants-VBScript
Is there any way to add reference scripts of a script in script control ?