How to add external reference to Invoke Code in UI path 2017.1

Hi All…

I am trying to Use Invoke Code activity in my artifact, but one issue is that when I am trying use any external namespace its giving error. Please help me out how to use Invoke Code activity with some demo artifact , how to import external namespace. I am trying to import Microsoft.Office.Interop.Excel in Invoke code activity.

3 Likes

Hi santosh,

Please try importing the namespace in the workflow instead. This should make it available within Invoke Code. Have a look at the following post for more details about adding external assemblies to projects:

1 Like

I had the same problem as santosh.
I imported the namespace Microsoft.Office.Interop.Excel into the workfow, but still this error when executing this line :

Dim appXL As Microsoft.Office.Interop.Excel.Application

Error is :
Main has thrown an exception

Source: Invoke code
Message: Error compiling code
error BC30002: Type ‘Microsoft.Office.Interop.Excel.Application’ is not defined. At line 11
Exception Type: ArgumentException

1 Like

Hi Metienne
Did you resolve the issue ?
I am also getting same error, even after imported the namespace Microsoft.Office.Interop.Excel.

Hi metienne,

I m facing same problem to import the RestSharp assembly. did u got the solution? please suggest.

Hi guys,

i am also facing the same issue.
please post if anyone resolved the above issue.

we will enhance this feature in a future release, for now some namespaces can t be imported