The type initializer for 'UiPath.Core.Activities.Design.DesignerMetadata' threw an exception

Hi,

I am a beginner to UiPath. I have installed the latest Desktop Version of it and trying to run my first automation. But whichever activity I select, every time I am getting the exception like mentioned above.

Any help would be appreciated.

Hi @shilpa_parit
Welcome to the Community

This issue happens due to package incompatibility.Some dependencies are not compatible with the project target framework, so Studio fails to load activities.

1 Please update the UiPath studio
Then restart UiPath studio
Create fresh projec then try if still issue is there please clear the cache

If solution works for you please mark as solution so it helps other too and if u have any doubts please let me know happy to help

Thanks & Happy Automations

This usually happens due to a project or package compatibility mismatch, where older or incompatible activities fail to load in the designer.

Creating a new process will resolve the issue. Then update the System and UIAutomation packages from Manage Packages and run a simple activity like a Message Box. Clearing the .nuget\packages folder will also help if the issue persists.

@shilpa_parit

go to manage packages and select a lower version of excel activities and check if the issue is resolved

or alternately install .net6 runtime

cheers

Updated studion n cleared temp files but still facing error

Try to reupdate activities like excel try with previous version or clear the nuget package

Followed the steps while saving project facing this issue.

Please verify the project type
“projectType”: “Windows”
And try this
Close UiPath studio
The delete package
C:\Users<username>.nuget\packages
C:\Users<username>\AppData\Local\UiPath
Then reopen UiPath studio and create the new windows project

Hope it help

Deleted the nuget folder.
Where can i find the ProjectType option?

@shilpa_parit
1.In Studio, right-click your project (in Explorer panel) → Open Folder in File Explorer
2 Find project.json in the project folder
3 Open it with Notepad (or VS Code)
Then see
“projectType”: “Windows”
If this see Windows Legacy then change it
“projectType”: “Windows”
Check the framework too make sure
“framework”: “net7.0-windows”
Then save the project json file
Close UiPath studio and reopen the project

Finally!!!

The issue has been resolved. Thanks a lot for your help

@shilpa_parit No Problem , Glad your issue is resolved.

Thanks & Happy Automations

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.