BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Pierre2
Fluorite | Level 6

Hello,

 

I am currently working on running and monitoring some EG projects through the SASEGScripting library via .NET.

I read the Global Forum paper by Chris Hemedinger as well as some of his contributions here(thanks a lot for these, it really helped!).

 

I am using an assembly resolver class in VB.NET (similar to the C# one shared by Chris somewhere else) that loads all the EG assemblies. Everything works fine when building and live running my program within Microsoft Visual Studio, but when I publish the solution I get this at installation:

 

image.png

Am I doing something wrong? Smiley Sad

Any help would be very appreciated. 

 

Have a nice day,

Pierre

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Automation in EG is supported -- it's the way that users can schedule projects to run unattended.  However, most of the testing/development focuses on the use of scripting languages like VB Script or PowerShell.  These approach the automation from the COM interface.  Using .NET goes directly against the code libraries -- which should always work but is a "less travelled" path.

 

SAS Viya does support APIs to access from other languages - Python, R, REST APIs and others.  However, you can also use SAS 9.4 for some of this too.  For Python, we have the SASPy package (an open source Python library).  And for .NET, you can write your own client to access SAS directly (bypassing EG).  Here are some articles to help:

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

5 REPLIES 5
ChrisHemedinger
Community Manager

Are you running on a machine where EG is installed?  Of course that's going to be a prerequisite.

 

And when you say "publish" the solution, do you mean you are building an installer?  

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Pierre2
Fluorite | Level 6

Yes EG is installed, and yes the problem happens when I actually run the Installer builded through the "publish" function in visual studio.

ChrisHemedinger
Community Manager

I confess that I don't have any experience with the Publish function in VS.  The "install" for your application should be simply a copy of your EXE to a machine where EG is installed.  You do not want to publish an app that will include/duplicate all of the DLLs that ship with SAS Enterprise Guide -- that would cause problems, and it's not something that SAS can support either.  We generally don't support the use of our "software bits" deployed outside of the confines of the apps we ship, except in a few cases with reusable libraries.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Pierre2
Fluorite | Level 6

Chris,

 

Yes running directly the .exe is working indeed! I used to always use "publish" to deploy apps. Publishing is nice because it allows users to have the app actually installed on their machine (with a registry key pointing at it and all...) but this will do fine as well, many thanks!

 

I have a more general question however: 

My fear is that .NET automation is not really supported and maybe not very stable. In your opinion, is this reliable anyway?

I know that SAS Viya will feature interoperability with general purpose languages like python or lua, do you know if this will allow the same flexibility and power as the SAS EG / .NET trick?

 

Thanks a lot,

Pierre

ChrisHemedinger
Community Manager

Automation in EG is supported -- it's the way that users can schedule projects to run unattended.  However, most of the testing/development focuses on the use of scripting languages like VB Script or PowerShell.  These approach the automation from the COM interface.  Using .NET goes directly against the code libraries -- which should always work but is a "less travelled" path.

 

SAS Viya does support APIs to access from other languages - Python, R, REST APIs and others.  However, you can also use SAS 9.4 for some of this too.  For Python, we have the SASPy package (an open source Python library).  And for .NET, you can write your own client to access SAS directly (bypassing EG).  Here are some articles to help:

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1936 views
  • 1 like
  • 2 in conversation