Hi,
I am trying to set the required namespaces and Assembly references for microsoft operations to work in my external code using invoke code activity.
After I set manually the references and namespaces , they disappear everytime after we run the bot or edit the activity.So we need to set them again everytime time before we run.
Steps to reproduce:
open any project/xaml file in notepad.
2.For eg : add <x:String>Microsoft.Office.Interop.Excel</x:String> under
<TextExpression.NamespacesForImplementation> and
xmlns:moie=“clr-namespace:Microsoft.Office.Interop.Excel;assembly=Microsoft.Office.Interop.Excel” in the namespaces.
3.After we save and run the bot, execution is successful.
Now open the same xaml file in notepad , the references are missing.
I would like to know if there is anyway to achieve the above process as a one time process instead of doing it manually everytime.
@sathishkumar191991- Thank you for the suggestion.I have already used this import option as you have mentioned but i keep getting the error as shown in image.(This is bcoz , the name space gets disappeared after every execution/edit causing the error)
@vvaidya- Yes I have added the above assembly manually , after checking your suggestions in other posts.
But this particular line from Namespaces " xmlns:moie=“clr-namespace:Microsoft.Office.Interop.Excel;assembly=Microsoft.Office.Interop.Excel" disappears after execution/edit (be it successful execution or Failed).
After I add the above namespace manually , i will be able to execute the workflow.
Hey thanks @aksh1yadav. Yes It is working now, the issue got resolved. I had not declared the objects/variables in a proper format i.e. using the arguments tab. Remaining is the same adding the required assembly reference.
@Abhishek_sharma, I’m still facing similar issue. Reference added manually in the xaml file keeps on getting removed on saving workflow. I have all the arguments set properly. Any guess?