5

Due to a disaster we have lost access to our source control and need to reverse engineer some XAML from the binaries. Ive looked around and found a couple of tools that are supposed to do this but they dont work.

Does anyone have a tool or know of one which works with .Net 4 WPF?

Thanks

Jonesie
  • 6,997
  • 10
  • 48
  • 66
  • Possible duplicate: [How to convert an assemblies BAML to XAML?](http://stackoverflow.com/questions/4014054/how-to-convert-an-assemblies-baml-to-xaml) – Devendra D. Chavan Mar 01 '11 at 01:52
  • @Devendra: the accepted answer you linked, [BamlViewer](http://reflectoraddins.codeplex.com/wikipage?title=BamlViewer), hasn't been updated since Feb 2007. Do you know for a fact that it works with .NET 4 WPF? – Matt Ball Mar 01 '11 at 03:14
  • @Matt - Just tried it against .NET 3 and 4 versions of PresentationFramework.Aero and it did not work for the .NET 4 assemblies. – CodeNaked Mar 02 '11 at 00:17
  • Not sure where you're at with this, but this blog post may provide some pointers - http://blogs.microsoft.co.il/blogs/tomershamam/archive/2007/05/25/Compiled-XAML-_3D00_-BAML-not-IL.aspx – cofiem Mar 06 '11 at 08:22

2 Answers2

7

Hey, if you still need this, may I suggest trying ILSpy. It is a new open source replacement for Redgate's .NET Reflector, and has built in support for BAML to XAML decompilation.

It only runs under .NET 4, and uses .NET 4's own BAML reading code, so I'd be shocked if it had issues with .NET 4 WPF BAML. That said, I've never used it for this purpose, so I have no idea how well it works, but there no harm trying.

Kevin Cathcart
  • 9,838
  • 2
  • 36
  • 32
1

I was able to recover XAML files using dotPeek. Import .dll & look for resources folder, that's it. ILSpy as suggested also works well.

mehul9595
  • 1,925
  • 7
  • 32
  • 55