Thanks @AlanC, I already have my API setup. It's the execution of SAS that is the problem which is the reason I'm here. The rest of the code was easy, but this integration is proving much more difficult than it should be. I was using this paper written by Kevin Kramer, https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/016-2007.pdf. But it just doesn't work. The problem once again as I stated in the opening is that you cannot simply reference SASEGScripting.dll because it has a Windows.Forms dependency and uses MessageBox's making non-interactive operation impossible. On top of that, assuming you can avoid all errors, you cannot get away with simply referencing that one DLL. The program has dependencies such as SASIOMCommonInterop.dll, SASOManInterop.dll, LibGitToSharp, and the list goes on. Just to get the program to run, I had to dump all the DLLs from SAS into my output folder. I will look into executing SAS EG from the command line, but I am just concerned that I will lose control of it (assuming it is some fire-and-forget). @SASKiwi , thanks for the response. I have actually spoken about this with my manager and trying to integrate multiple technologies in a pipeline is really overly complicated and he agrees. We are just stuck in a place where we have the ETL tool and we have the SAS projects. There are hundreds or thousands of them and we can't rewrite them, not without a massive cost and risk to the business. We are not scheduling these processes, they are run on demand. Honestly, I just expected more from such a large company as SAS and I'm very disappointed. There should be a SAS-supported NuGet package that can be referenced where all the dependencies are taken care of with documentation on the various usages. UPDATE: I have managed (unfortunately using my hacked SASEGScripting.dll) to get the SAS EG to run to completion. My next problem is that it's just not doing what it should. It is now unable to move files from the dropped location into the SAS for execution. The same EG executed manually on the server works just fine. So I think I have some permissions that need to be taken care of. Frustratingly, SAS reports successful execution even though the logs show otherwise. I'm not out of the woods yet though, and this application really stinks of maintainability issues with a ton of debt. I think, as a community, we need to start a community .NET integration GitHub page where we can publish a much-needed NuGet package. Else, I need to quit my job and apply at SAS so I can sort this out for them.
... View more