mplab icd 2 matching device id
ICD2 reports target 0x00 when either you have no device attached or it can't be succesfully read.
Check if you have the target attached right (duh). If the answer is "Yes", select any .HEX file, launch a device programming, so check the VDD and VPP voltages, that must be 5V and 13V respectively (measure them as programmer is running).
If both voltages are OK maybe there's some mistake around PGC and PGD driving circuitry.
If VDD is wrong, you have to power the target from either ICD2 or the own target supply. In order to power the target from the ICD2 you must select the checkbox placed at: programmer/settings/power/power_target_circuit_ from_MPLAB_ICD2, and turn the target supply off.
If VPP is wrong check the VPP voltage reported by the ICD2 window. I detected that ICD2 pass the VPP test even when this voltage is as low as 6.5 volts, what isn't really ok.