Retrieve Correct XAML File from Nupkg

Hi all,

I’ve recently been decrypting dll files from nupkg libraries in order to retrive the original xaml using dotpeek. however it doesn’t work all the time.

sometimes i get the original xaml with opens correctly in uipath
ex:
<x:Members><x:Property Name=“In_TimeOut” Type=“InArgument(x:Int32)” /></x:Members>mva:VisualBasic.Settings<x:Null /></mva:VisualBasic.Settings>sap2010:WorkflowViewState.IdRef …etc

and sometimes the xaml is like this: (this gives invalid document in uipath)

<?xml version="1.0" encoding="utf-8"?><xx in_RetryTimes="{x:Null}" in_Timeout="{x:Null}" out_xx="{x:Null}" xmlns="clr-namespace:xx=xx" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:p="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:p1="http://schemas.microsoft.com/workflow/2012/07/xaml/activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:ui="http://schemas.uipath.com/workflow/activities"

can anyone help on how can i make the 2nd xaml work on uipath?

@Ayasoliman

What is the source of nupkg files?

i use dotpeek to open the dll extracted from the nupkg library, sometimes it extracts the two types of xamls and sometimes just one and i can’t retrieve the second that works

@Ayasoliman

Are these the published project nupkg that were installed on robot?

they are installed on orchestrator not on the robot. i’m trying to get the original source code

@Ayasoliman

OK. Try this method. I hope it should work.

  1. Save (paste) the nupkg (e.g., demo1.nupkg) file on the location C:\ProgramData\UiPath\Packages on your local system
  2. Go to the UiPath Assistant (you can find in taskbar), the package you save in the first step will appear in the robot
  3. Install it
  4. Go to location C:\Users\userName\.nuget\packages
  5. Find your package folder (e.g., demo1)
  6. Inside it navigate to net45 folder (e.g., C:\Users\userName\.nuget\packages\demo1\1.0.1\lib\net45)
  7. In the example above the package name is demo1 and all the files are inside net45 folder

Hi,

We can extract source code from library dll using some tool as the following.
(The following is to use dnSpy)

Can you share the dll which you cannot extract source, if possible?

Regards,

I installed dnSpy but it also didn’t extract _original.xaml :frowning: i cannot share the dll unfortunately, is there anyway to convert the “<?xml version="1.0" encoding="utf-8"?>” file to this?

i’m using an old verion of uipath, no assistant or admin rights

Hi @Ayasoliman,

There is an alternative: Using 7Zip

Download package from Orchestrator then use 7Zip to access to .xaml files.

  1. Open the nupkg with 7zip and all your xaml files will be available in the \lib\net45\ folder.
  2. You can further unzip the .nupkg and store the contents in a temp folder

This way you have access to the .xaml files without worrying about possible file corruption.

1 Like

Hi,

Is the dll certainly made by UiPath Studio?
Is there any error message if open the xaml?

Regards,