While I’ve been a dedicated build/install guy for about 12 years now, I still spend a lot of time on the internet researching and honing my craft. During this time, I often come across posts from otherwise seemingly competent Software Engineers who grossly underestimate the complexity of setup. They frequently post messages in an expert voice that outline solutions that are far from best practice.
Tonight I read a message thread where someone was having a problem getting a WiX DTF Managed Custom Action to display a MessageBox. Another developer quickly replied with the traditional `Managed Custom Actions are Evil` mantra:
Using C# is the problem. You have to use a native Win32 DLL for a custom action, not managed .NET code. This is an ongoing debate because more and more programmers are .NET-only (which is, but this is strictly my personal opinion, a very big problem, programmers have to know several languages, including C, C++ and Pascal and similar to call themselves programmers but I digress) and .NET does offer a nice, cosy environment to do things in. Still, this is not an arbitrary limitation, it has it reasons. See http://www.tramontana.co.hu/wix/lesson3.php#3.5 for a short description and a link to Rob’s blog detailing the issue.
Wow. This is simply not true… the debate is dead.
Anyone with more then a passing interest in Windows Installer knows that three months ago MSFT/WiX/Rob/et al did a 180 degree, ABOUT-FACE!, flip/flop and started supporting managed code custom actions when they released Deployment Tools Foundation (DTF). Rob’s blogged it, Justin’s blogged it, I’ve blogged it repeatedly ( with tutorials ), InstallSite has covered it, it gets discussed in the WiX list, the Platform SDK newsgroup and even the InstallShield Community forum. You simply can not be a Wi/Wix/IS/Setup Expert and not know about DTF. Period!
The interesting part is that the person who made this comment also runs the Tramontana WiX tutorial site which is often cited by beginning WiX developers as `I’d never gotten it done without this tutorial!`.
A quick review of that tutorial shows that the topic on managed code custom actions is full of out dated information citing outdated references.
Another interesting observation in my mind is this developers bias in implying that real developers should be able to code Win32 DLL’s in multiple languages such as C, C++, Basic (what version? VB6 couldn’t natively export Win32), D, Eiffel and Pascal in order to claim that they are real programmers. All of this while eschewing the .NET framework.
Very interesting. Anyways, I’m not meaning to hurt anyones feelings. I just wanted to point out that you should be very careful what you read on the internet. This site excepted of course. 🙂 ( Seriously, when I make mistakes, please leave a comment.)