After creating a new project with the targetFramework of Windows, I am unable to copy its activities to a different project that uses the older Windows-legacy framework. I am also unable to invoke the new workflow from the Windows-legacy framework project.
How can I change the targetFramework back to Windows-legacy project?
After editing the Project.json and changing the targetFramework to Legacy, attempting to open the Main.xaml workflow, in the project, produces the following error messages:
Is there an alternate way to change the targetFramework or to resolve these errors?
12/04/2021 09:49:10 Could not find member âSettingsâ in type âErrorâ. Row: 5, Column: 4
12/04/2021 09:49:10 Could not find type âSystem.Collections.Generic.List(AssemblyReference)â in assembly âSystem.Private.CoreLibâ. Row: 46, Column: 6
12/04/2021 09:49:10 Could not find type âSystem.Collections.Generic.List(String)â in assembly âSystem.Private.CoreLibâ. Row: 11, Column: 6
12/04/2021 09:49:10 Could not find type âSystem.Collections.Generic.List(AssignOperation)â in assembly âSystem.Private.CoreLibâ. Row: 102, Column: 10
12/04/2021 09:49:10 Could not find type âSystem.Collections.Generic.Dictionary(String,Object)â in assembly âSystem.Private.CoreLibâ. Row: 95, Column: 8
12/04/2021 09:49:10 Could not find type âSystem.Collections.Generic.List(ITarget)â in assembly âSystem.Private.CoreLibâ. Row: 138, Column: 22
I normal case changing from âwindowsâ to âlegacyâ and âlegacyâ to âwindowsâ will work through project.json file change on one condition All dependency should be compatible with the target framework.
For example:
In the below I changed the project from âlegacyâ to âwindowsâ (means .Net Framework4.6.1 to 5.0) but UiPath.PDF.Activities are not compatible with it.
Thank you for the reply. Checking all imports for this project does not show System.Private.Corelib. I was searching for a way to disable this particular dependency so that I could revert to the Legacy targetFramework.
Any other suggestions? (Otherwise I will must recreate the workflow, step by step, in order to have it work in Legacy framework).
To summarize this thread for future readers:
I have two UiPath Projects
Project 1 - Created using Windows-Legacy Compatibility
Project 2 - Created using Windows Compatibility.
I cannot invoke a workflow in Project 2, from Project 1.
Solution(s);
Solution 1 - Update Project 1âs Project.json file so the targetFramework = âWindowsâ. Now both Project 1 and Project 2 use the âWindowsâ compatibility and work as expected.
Alternative solution:
If simply changing the Project.json targetFramework in Project 2 back to âLegacyâ does not work then:
Recreate Project 2 in Windows-Legacy compatibility. This requires redoing each and every activity, because (in my case) I could not simply copy and paste the activities from Project 2 (Windows compatibility) to Project 1 (Legacy).