XSD.exe and imports – a solution

If you’re reading this right now, it’s likely because you just discovered that XSD.exe doesn’t honor import declarations within XSD files.

It sure caught me and several others by surprise.

The fix, it turns out, is to manually specify each XSD that the primary XSD requires. Something like xsd.exe primary.xsd imported.xsd another.xsd

In my case, my primary XSD file imported several XSD files… those those imported XSD files imported their own XSD files.. And putting that nasty command line together manually is just too far below my pay grade.  …Continue reading “XSD.exe and imports – a solution” [XSD.exe and imports – a solution]

Fun code

(If you are a developer for a health insurance company looking for details on this project, you’ll find that towards the bottom)

Let’s face it, some code is more fun than others. Especially when you get to create a brand new project from scratch. For me, it’s even more fun when there’s no UI to make “pretty”.  And that’s exactly what I got to write over the past week.

It was a simple project with a terrific opportunity to write some amazing code: Take some CSV files and convert them to the format outlined here. Add bonus points for going well beyond the validation requirements in the spec.

In the end, there were 1764 lines of code, with 76 passing unit tests achieving over 98% code coverage. There’s also zero duplicate code and, for me, at least, some decent metrics upon analysis. …Continue reading “Fun code” [Fun code]

Chocolatey Hotkey – using and creating plugins, hosts, and libraries

I’ve made a lot of changes to CHK since my first post a couple of weeks ago. CHK now works much better and is much more powerful. Let’s just say this thing turned out to be a much bigger project than I originally anticipated, and I learned a lot in the process.

This time, I’ve created a video to illustrate how CHK works, and how to begin using CHK yourself. It’s not an awesome video, but hopefully it gets the point across. …Continue reading “Chocolatey Hotkey – using and creating plugins, hosts, and libraries” [Chocolatey Hotkey – using and creating plugins, hosts, and libraries]

Entity Framework Power Tools for Visual Studio 2015

2017: Why is this post so popular? It’s always one of the highest viewed posts on my site and I’ve never understood why. When you’re done reading, please leave a comment letting me know.

I have patched the Visual Studio 2013 version of Entity Framework Power Tools (beta 4) to work with Visual Studio 2015.

You can download it here.

Source code for this extension is not available, and I did not have time to go to Microsoft to figure out when/if they’re going to release an update. Here are the steps I performed to update the extension:  …Continue reading “Entity Framework Power Tools for Visual Studio 2015” [Entity Framework Power Tools for Visual Studio 2015]

AttachTo (IIS, IIS Express) extension for VS 2015

UPDATE as of 8/3/2015 9:16:35 AM by AD: It appears that Mr. Whut is updating AttachTo himself now to work with newer VS versions and I failed to realize that. I do not know at what point that he fixed AttachTo, but it would have been nice to know before I went through the trouble. :) I will leave this post in tact for reference.

Well, it’s that time of the year again where we the community band together and patch the AttachTo extension so it will run in the latest version of Visual Studio (2015 in this case).

The original developer is unresponsive, so I forked the repo and have been figured out what it takes to fix it. Last year, Kyle Ballard posted a compiled version of the Visual Studio 2013 update of AttachTo  on his blog.

This year, I figured I’d save everyone some time and offer the download Visual Studio 2015 update for AttachTo directly from my blog.

So… Here it is… Download AttachTo for Visaul Studio 2015

See you again in 2017?

Chocolatey + AutoHotKey = Chocolatey Hotkey (CHK)

UPDATE as of 8/10/2015 9:56:14 AM by AD: I have made a lot of changes to CHK since writing this post, so I just updated it to reflect those changes. If you’re coming here a second time for reference, please take a lot at my second post about CHK.


Wouldn’t it be cool if anyone could quickly and easily install one of your AHK scripts on their own computer?  Or imagine sitting down at someone’s computer and typing a simple command to install an AHK script that you find useful.  And wouldn’t it be cool if others could contribute to this mechanism to create a community of easily installable and maintainable scripts?!?!?

You can now, with Chocolatey Hotkey (CHK). CHK is, essentially, a package manager for AutoHotKey scripts that utilizes Chocolatey for distribution. It is also a great way to modularize your scripts as plugins instead of having one big AHK script that you have to maintain.  …Continue reading “Chocolatey + AutoHotKey = Chocolatey Hotkey (CHK)” [Chocolatey + AutoHotKey = Chocolatey Hotkey (CHK)]

A day of dumb…

I spent all day trying to figure something out in Entity Framework that shouldn’t have taken an entire day to figure out. It was so dumb, I feel obligated to post it here.

The code below illustrates the problem. The Test method is simply trying to add a new Child record to the database. Notice that the Child class contains a nullable foreign key to the Parent class public int? ParentId { get; set; } . In theory, that meant I could create a new Child object without having to associate it with a Parent object.

Except any time I tried to save the record, I’d get an error indicating, ultimately, that a new Parent record was being created. But why? I wasn’t creating a new parent record….

OR WAS I?!!?!?

Here’s the pseudo code.. See if you can spot the problem that took me waaaaayyyy too long to find..  …Continue reading “A day of dumb…” [A day of dumb…]

Taking Visual Studio build and publish events to the next level

2017: Why is this post so popular? It’s always one of the highest viewed posts on my site and I’ve never understood why. When you’re done reading, please leave a comment letting me know.

I just integrated Visual Studio’s web project publish command with Zapier  so I can send build events to Slack.

That’s a twofer, folks. I just killed two birds with one really awesome stone.

Seriously, the possibilities here will blow your mind, especially given how easy it is to make it happen.

First, I’ll explain how I hooked into the publish event. If you’re more interested in the Zapier part, feel free to skip to the next section. …Continue reading “Taking Visual Studio build and publish events to the next level” [Taking Visual Studio build and publish events to the next level]

Fixing Disqus in the WordPress Twenty Fifteen theme

The new WordPress Twenty Fifteen theme is pretty nice. But if you’ve just activated this theme and you’re using Disqus as a comment system, you might have noticed the comments don’t look right:

 Here’s how I fixed the problem..  …Continue reading “Fixing Disqus in the WordPress Twenty Fifteen theme” [Fixing Disqus in the WordPress Twenty Fifteen theme]

Automatically Generating a Chocolatey Install Script

Have you ever dreaded formatting your computer because of all the software you know you’re going to have to re-install? Do you wish there was an easier way?

I’m looking at having to format one of the computers in our office and I want it have the same software that I have installed on my primary machine.

Since I use Chocolatey and WebPI to install most of the software on my computer, I was able to create a neat little Powershell script that should save me a lot of time with this task.  …Continue reading “Automatically Generating a Chocolatey Install Script” [Automatically Generating a Chocolatey Install Script]

Scroll Up