UiPath.Python.Activities.PythonScope not working with “targetFramework”: “Windows”. It works fine when “targetFramework”: “Legacy”.
I have written all my code with “targetFramework”: “Windows”, now converting it back to legacy will be a challenge.
Also why should I downgrade and even UIpath is giving me warning that “Windows-legacy compatibility is phased out and no longer be available for new projects”.
Hi @Rahul_Unnikrishnan, we are using version python 3.8.2.(stable version) and packages installed in uipath are latest version “UiPath.Python.Activities(version 1.6.0)”
It is working in windows-Legacy but not working in windows.
One potential cause of this error is that “.NET 5.0 Desktop Runtime (v5.0.17)” is not installed on your machine.
To be sure this is the cause, you can use Event Viewer to see the exact error and some details about how you can fix the error. See below some steps of how you can use Event Viewer:
Open Event Viewer
Start the process in UiPath Studio
Look for an error to appear in Event Viewer (under Windows Logs > Application)
If you have an error saying that .NET is missing, you should download the tool from the URL specified in the error.
I think the issue has something to do with the target framework.
I have created two projects (replicas), one with Windows, and another with Windows legacy. Same Python version (>=3.10) and the same Python package version (1.6.0). Basically, everything is identical except the target framework. And .NET 5 is installed.
Result: The Windows code just doesn’t go inside the Python Scope and gets stuck there, while the legacy one runs as expected.
Update: My hypothesis was incorrect. The target framework was not the issue.
What I did: I installed the entire .NET 5 SDK, instead of just the .NET 5.0 Runtime (which was suggested in one of the posts on the forum), and it worked.