Nandor

For some reason I cannot run any WPF app once it's been obfuscated (I'm using the latest version of Dotfuscator Pro). It can be run if renaming is disabled in Dotfuscator. Does anyone know of a list of items to exclude from renaming (rather than disabling it completely) in order to use obfuscation on WPF applications

Thanks for any ideas.



Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

ivolved_Mike_Brown

I would avoid renaming anything referenced in your markup or via the binding system. Other than that, I'd assume it all would be fair game.




Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

Nandor

Many thanks, I'll try that. Problem is I'm calling a lot of other (non visual) code via WPF event handlers and my other libs are obfuscated. Wrapping my DLL's into an open (non obfuscated) API is a lot of work and also exposes it. With Windows Forms I could simply link all DLL's into a single assembly which could then be obfuscated. Is there not a way to do this with WPF





Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

Ashish Shetty - MSFT

You may be running into issues because there is no obfscation support for XAML compiled to binary format. You see, this compiled XAML has type and assembly name references. When you obfuscate your assemblies, that changes the type names so the references in the compiled XAML are no longer valid. This is a problem that the XAML team in WPF is looking to fix.




Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

Nandor

Thank you, it makes more sense now. I'll find a workaround in the meantime.



Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

ivolved_Mike_Brown

This is where the Facade pattern comes in handy. You have a class (or collection of classes) that present the frontage of your API. Your UI event handlers call the methods on the Facade which is unobfuscated and does nothing more than call the methods within your lower API. Thus you're revealing nothing more than the very tip of your application logic.




Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

johnvarney

Anyone know of a workaround

I have an exe and 11 dll's, all written with WPF, .NET 3.0. Both Dotfuscator and Xenocode Postbuild produce a none working exe.

Xenocode Postbuild can link into one assembly and has a 'Dissassembler Suppression' feature, blocking both Xenocode Fox and ILDASM. Anyone know if this would be sufficient code protection

Thanks

John





Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

johnvarney

Just tested the Postbuild 'link into one assembly' feature and that fails also.

I know that someone could disassemble back to 'source' code. Can anyone get back to the original XAML. I suspect not but don't know.

John





Re: Windows Presentation Foundation (WPF) Why can I not obfuscate a WPF app

ivolved_Mike_Brown

Yes there is a Baml disassembler available now that works with Lutz Roeder's Reflector.