I apologize if this has already been covered here but I did look!
I don't use PICs heavily so I just stick to my old PicKit3 rather than buying anything new, I have a mixture of projects some still using MPLAB8 under windows and some later ones using MPLABX under Linux together with a mixture of targets including PIC16F, PIC18F & PIC24EP.
So recently I went to re-program a PIC24EP under MPLAB8/WIN and got the cryptic "programing failure" with no other message , of course I assumed it was hardware and set of to test everything but could find no fault. During testing I tried a PIC18F project again under MPLAB8/WIN and got the even more shocking, device id zero!! making it look even more like dead hardware.
To cut a long story short the problem was the use of MPLABX, it had changed something in the PicKit3 making it no longer compatible with the firmware used by MPLAB8
,
My work around for now is to reload the firmware when changing device using MPLABX even if programming with MPLAB8.
I cannot find out where X stores it's firmware files else it might be possible to import them into 8. Unfortunatly Microchip seem to have removed all PicKit3 firmware files from there site
For reference the versions I am using are MPLAB8.92 with PicKit firmware 01.28.90 & MPLABX5.35 with PicKit firmware 01.56.07
MPLAB8.92 is I believe the last version & MPLABX5.35 is the last version I found supporting PicKit3 AND MPASM!
Hope this helps someone with the same problem