Convert Project(Windows) to Project(Legacy) error

I convert Project(Windows) to Project(Legacy) by edit in file.json

targetFramework Legacy

But after change I open .xaml
But show error as below.

Please guide me for solve it.
Thank you

I do not think you can simply convert Windows project to Legacy project by just editing project.json.
Windows project is using slightly different scheme of XAML file - see below.

Legacy - left
Windows - right

Cheers

@J0ska Can you idea for change window to legacy?

Just delete (or back-up) the json and open the project again.
Studio will regenerate a clean json for you. Just be sure to validate your dependencies and project settings aftwerwards.

And converting to windows: us the conversion toolings for it, not just editing your json.

Hi @Stef_99 we can convert legacy to windows but not windows to legacy.

@Jeroen_van_Loon how to check it?

in the project - dependencies tree

You may try changing the <Activity> tag in XAML file (first line in the file) with the following

Not guaranteed. Make backup of your source file first indeed.

<Activity mc:Ignorable="sap sap2010" x:Class="Sequence" mva:VisualBasic.Settings="{x:Null}" sap:VirtualizedContainerService.HintSize="390,45" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

@J0ska it error as below.

image

Try the following:
In the original XAML file find in <activity> tag
VisualBasic.Settings="{x:Null}"

and change it to
mva:VisualBasic.Settings="{x:Null}"

and add
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"

@J0ska error as below.

image

My file xaml as attached.
UploadFileSFTP - Copy.xaml (23.3 KB)

Is it the original, windows, not modified XAML file?

@J0ska my original file window as attached.

UploadFileSFTP.xaml (23.1 KB)

Slightly better. File can be opened now. Still there is unresolved activity.
UploadFileSFTP.xaml (23.3 KB)

@J0ska Can open file but acitivity in file disappear?

What changes did you make to the code?

even better now

all XML schemas that refer to assembly System.Private.CoreLib
e.g. xmlns:s="clr-namespace:System;assembly=System.Private.CoreLib"

must be changed to refer to assembly mscorlib
e.g. xmlns:s="clr-namespace:System;assembly=mscorlib"

UploadFileSFTP.xaml (23.2 KB)

1 Like

Sorry to jump in but I found this topic is interesting.
I tried follow the step by this post Windows-Legacy - Help / Studio - UiPath Community Forum. Then download UiPath.FTP.Activities[v2.3.0] and UiPath.Credentials.Activities[v2.0.0], which should be ready at your project.
Then I could open the xaml without error.

Just saw the J0ska’s update. Should be the same.

1 Like

@J0ska yes, It work

What all changes did you make to the code?

because I have more file to edit code.

@Stef_99 you can try below hope it sove the issue

Second one

@Stef_99 if you have any issue let us know

only changes in the <activity> XML tag described above

In the original XAML file find in <activity> tag
VisualBasic.Settings="{x:Null}"

and change it to
mva:VisualBasic.Settings="{x:Null}"

and add
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"

all XML schemas that refer to assembly System.Private.CoreLib
e.g. xmlns:s="clr-namespace:System;assembly=System.Private.CoreLib"

must be changed to refer to assembly mscorlib
e.g. xmlns:s="clr-namespace:System;assembly=mscorlib"

Seems to be the same what is described in Windows-Legacy - #4 by 447_J_U_S_SANDEEP

Cheers

1 Like