I’m a moderate user of extensions. As in, I have some favorites, but I’m not trolling the gallery everyday.
I’ve never made one before. No idea has either been both big enough and small enough to warrant me building an extension.
In April 2016, at Build, I saw Mads Kristensen create & publish (with integrated CI, and pretty images) a brand new extension during a 1 hour session. It was a great talk, and I had promised myself that I would watch it again on Channel9. I also signed up to be a VS Partner while at build.
I received an email about a week ago saying my VS Partner status would be canceled, unless I published a product in the next week.
Two days later, I came across a fitting challenge for an extension. So I set out to build it.
I followed Mads’ video, and it was surprisingly easy. The docs are still very confusing for the VS interfaces, but it was still doable.In the end, what took Mads less than an hour on stage, took me about 5 hours of total work at my desk.
All in all, it was still surprisingly easy, and I regret not doing it sooner.
I wrote a nice little tutorial about using fakes in C#. It cover Shims and Stubs. It also covers testing private methods using the InternalsVisibleTo attribute.
This is a nasty one to track down in production, so I’m going to show you here.
VBScript has a fun way of interpreting include references that are nested inside an if statement. It will load all include references. If you have different functions, with the same name, it will use the second one.
The output of myTest.asp is:
Case 1 executing…
Function 1 loaded…
Function 2 executing…
Thanks for reading.