# Error in Invoke Code Activity

**URL:** <https://forum.uipath.com/t/error-in-invoke-code-activity/524621>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, system, activities\
**Created:** [March 9, 2023, 11:49am UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621 "2023-03-09T11:49:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreyash\_shirbhate](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shreyash_shirbhate/32/205441_2.png) [@shreyash\_shirbhate](https://forum.uipath.com/u/shreyash_shirbhate)\
**Post date:** [March 9, 2023, 11:49am UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/1 "2023-03-09T11:49:58Z")

</div>

Hi Guys, Did anyone face similar issue? If yes, Can you please help me resolving it.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/4/4/6/4466a7161edfe4e6b8fd094910fda40368de57d2.png)

UiPath Enterprise Studio Version: 2020.10.06  
System Activities Version: 21.10.04

The error is kind of weird because when I reopen the code then the Error is getting disappear and I am able to run the workflow. But when I am trying to edit the code then same error is coming again and I am not able to run the workflow.

To run the workflow, I need to save the changes which I have made and then I am closing the UiPath. After reopening the same code it is working fine.

I have already gone through couple of forum post but no luck. I did playground with adding and removing namespaces. Also, I have tried upgrading and downgrading the system activities package.

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [March 9, 2023, 11:53am UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/2 "2023-03-09T11:53:11Z")

</div>

Hi,

InvokeCode activity in UiPath.System.[Activities](https://docs.uipath.com/activities/docs/introduction) package 21.10 (or higher) doesn’t support [Studio](https://docs.uipath.com/studio/docs/introduction) 21.4 or lower as the following document.

> **[Invoke Code](https://docs.uipath.com/activities/docs/invoke-code)**
>
> UiPath.Core.Activities.InvokeCode Description Synchronously invokes VB.NET or C# code, optionally passing it a list of input arguments. This activity can also return out arguments to the caller workflow. Project compatibility Windows - Legacy |...

Can you try upgrade your [Studio](https://docs.uipath.com/studio/docs/introduction) to 21.10 or higher etc OR downgrade System.[Activities](https://docs.uipath.com/activities/docs/introduction) package to 20.10 etc.

Regards,

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 11:54am UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/3 "2023-03-09T11:54:25Z")

</div>

@shreyash_shirbhate

Please match your system activities with the studio version you have.

cheers

---

<div class="post-metadata">

**Author:** ![shreyash\_shirbhate](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shreyash_shirbhate/32/205441_2.png) [@shreyash\_shirbhate](https://forum.uipath.com/u/shreyash_shirbhate)\
**Post date:** [March 9, 2023, 11:58am UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/4 "2023-03-09T11:58:04Z")

</div>

Hi @Yoichi,

I want to upgrade my studio to below version.

![image](https://global.discourse-cdn.com/uipath/original/4X/a/9/e/a9eabdf4a7f8ba9718e076b3922e5c7fb22401f0.png)

Where will I get the .msi file for the same?

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 12:06pm UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/5 "2023-03-09T12:06:34Z")

</div>

@shreyash_shirbhate

If you orchestrator is of latest version can try checkign the Resource centre where the studio msi installation fiels would be available

 ![image](https://global.discourse-cdn.com/uipath/original/4X/f/9/4/f94e0e4ea8917f6a4f9b1ac39c626e3b9c55475f.png)

> **[Studio - Update Studio](https://docs.uipath.com/studio/standalone/2022.10/user-guide/update-studio)**
>
> The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...

 ![image](https://global.discourse-cdn.com/uipath/original/4X/1/8/a/18aadcc1f29b2ff96314d77da1916d4ed5db8a20.png)

Can downlaod the installer from there

Or

> [@UiPathOrchestrator.msi 2021.4 download](https://forum.uipath.com/t/uipathorchestrator-msi-2021-4-download/354415/10):
>
> If you feel like all of these are taking time, you can construct the download url by yourself. Check the release notes to find out what’s the latest version available [https://docs.uipath.com/orchestrator/docs/release-notes-2021-4-3](https://docs.uipath.com/orchestrator/docs/release-notes-2021-4-3) Construct the URL as below: [https://download.uipath.com/versions/{version\_no}/UiPathOrchestrator.msi](https://download.uipath.com/versions/%7Bversion_no%7D/UiPathOrchestrator.msi) Current version available is 21.4.3, so you can try the below URL for msi file. [https://download.uipath.com/versions/21.4.3/UiPathOrchestrator.msi](https://download.uipath.com/versions/21.4.3/UiPathOrchestrator.msi)

cheers

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [March 9, 2023, 12:07pm UTC](https://forum.uipath.com/t/error-in-invoke-code-activity/524621/6 "2023-03-09T12:07:39Z")

</div>

Hi,

FYI, we can get Studio installer in ResourceCenter in AutomationCloud if have Enterprise license.  
And easily estimate URL of specific version installer.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/a/4/4/a449d68d436953f6de3d5275101c87a45989b145.png)

Regards,
