c# - Could not load type 'SAS.LanguageServiceCarriageControl' from assembly -


in addition using integration components of sas enterprise edition, using parts of following project found on github connect sas server. goal here command server run programs on schedule. however, programs need modified each time, why attempting trigger them run in manner. however, keeps throwing error @ lang.flushloglines.

https://github.com/cjdinger/sasharness

sas.workspace ws = server.workspace; list<string> results = new list<string>(); array ccs; array linetypes; array loglines; int maxlines = 100; sas.languageservice lang = (sas.languageservice)ws.languageservice; array linesvar = (array)new string[] { program_text }; lang.submitlines(ref linesvar);  //throws error here lang.flushloglines(maxlines, out ccs, out linetypes, out loglines);  (int = 0; < loglines.length; i++) {     results.add((string)loglines.getvalue(i)); } 

after bit of research found following thread recommended make sure required dlls referenced in project. mystery here have them referenced, error still occurs.

http://blogs.sas.com/content/sasdummy/2013/06/09/sas-client-with-microsoft-dot-net/

moreover, starting after first line, code no longer using sasharness, using native sas integration libraries only. code above based on examples listed in following documentation sas.

https://support.sas.com/documentation/cdl/en/itechwcdg/61500/pdf/default/itechwcdg.pdf (page 27-28)

has encountered error similar this, , if so, how did correct it?

strangely, fixing error required declaring instance each of assemblies not loaded. have no idea why fixes problem, works now.

sas.workspace ws = server.workspace; string wsid = ws.uniqueidentifier;  list<string> results = new list<string>(); array ccs; array linetypes; array loglines; int maxlines = 100; sas.languageservice lang = (sas.languageservice) server.workspace.languageservice; array linesvar = (array) new string[] { program_text };  lang.submitlines(ref linesvar);  //for reason, these 2 declarations need here sas.languageservicecarriagecontrol carriagecontrol = new sas.languageservicecarriagecontrol(); sas.languageservicelinetype linetype = new sas.languageservicelinetype();  lang.flushloglines(maxlines, out ccs, out linetypes, out loglines); (int = 0; < loglines.length; i++) {     results.add((string) loglines.getvalue(i)); } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -