Desktop productivity for business analysts and programmers

EG7.1 .NET automation : problem when publishing the solution

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

EG7.1 .NET automation : problem when publishing the solution

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


Accepted Solutions
Solution
‎08-04-2017 11:18 AM
Community Manager
Posts: 2,955

Re: EG7.1 .NET automation : problem when publishing the solution

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:

 

View solution in original post


All Replies
Community Manager
Posts: 2,955

Re: EG7.1 .NET automation : problem when publishing the solution

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?  

New Contributor
Posts: 3

Re: EG7.1 .NET automation : problem when publishing the solution

Posted in reply to ChrisHemedinger

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

Community Manager
Posts: 2,955

Re: EG7.1 .NET automation : problem when publishing the solution

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.

New Contributor
Posts: 3

Re: EG7.1 .NET automation : problem when publishing the solution

Posted in reply to ChrisHemedinger

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

Solution
‎08-04-2017 11:18 AM
Community Manager
Posts: 2,955

Re: EG7.1 .NET automation : problem when publishing the solution

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:

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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