No compiled code to run error BC30560

I have program in version 2017, I migrated it in 2019.4.4, when I run it I get the error message during an INvoke Code

No compiled code to run error BC30560: ‘_Application’ is ambiguous in the namespace ‘Microsoft.Office.Interop.Excel’. At line 1

Please help.

I’ve got this problem too - did you find a resolution please?

Same problem here.

I am also facing same problem when try to run c# code

In my case, the access to a namespace was not clear. This caused the error in my case.

I added ClosedXML as a dependency and wanted to use it in InvokeCode. But I had 2x this dependency with different namespaces in the project.

Because the UiPath.Excel Activities also have ClosedXML as dependency. I can only advise you to check your dependencies in the project!

If posible you can move the invoke code activity to new .xaml file (Do not forget parameters), after that you can use invoke work flow activity to call the new file and check the option isolated on it. it worked for me because the new file is executed as new windows process.