I'd like to run a custom EXE against my XAML Resource Dictionaries. Let's say this exe that I've got is going to strip out comments, whitespace and unused resources. The original XAML files need to be untouched, but the XAML (silverlight) and BAML (wpf) that ends up in the XAPs and DLLs needs to be transformed. It needs to work on my computer and the build server.
My question is: what's the simplest and most reliable way to run this exe?
My first thought was to have a pre-build event. But this would have to work on the original XAML file. Development would become quite painful.
By the time the post build event has been run, my resources are already compiled into the dlls.
What are my options?