marspox
marspox

Reputation: 31

How to extract code of XAML files from executable file

we have noticed lately that we don't' have source code of some desktop applications (WPF) created by one of our developer. Applications are already used by production (I know it's shame...) I have tried to decompile these apps via JetBrains dotPeek, but I cannot extract xaml code. Is there any way to decompile .NET app including xaml files?

To be more precised, I have checked also ILSPY but it seems that there are no baml files under Resources in ILSPY (please see attached )

picture

Upvotes: 1

Views: 2962

Answers (1)

JonasH
JonasH

Reputation: 36541

From dotpeek features.

dotPeek can also decompile .baml files, enabling you to reconstruct XAML UI definitions.

Go to the resources entry of your assembly and look for entries ending with "g.resources", this should contain .baml files for your various controls and views. Opening the .baml file should show you the decompiled xaml. This is using dotPeek 2021.1.

Example:

enter image description here

Upvotes: 1

Related Questions