They shot themselves in the foot right out the gate by trying to copy Apple's $99 annual fee for developers to publish their apps. Whatever initial enthusiasm there was for Windows Phone quickly disappeared when they added that requirement. When they finally figured out it wasn't going to be a new revenue stream, they reduced it for a while instead of eliminating it. When they finally realized just how badly they had messed up and removed all the fees, most developers had already moved on and never gave Windows Phone another look.
It reminds me of the failure of Windows Home Server. It was removed from MSDN because the product manager said developers needed to buy a copy of it if they wanted to develop extensions and products for Home Server. Very few bothered. However many dozen licenses the policy lead to being purchased was dwarfed by the failure of the product to gain market share. Obviously that wasn't only due to alienating developers but it certainly was part of it.