If you have MCLR on, then totally disregard my above comment! :<) If the chip is soldered in, look for a cold solder joint, short, or there is too much load on the programming pins for the chip's liking. Also, I once had a processor in circuit, and it would only programming with power to it, because the larger than .1uF bypass capacitor on the Vdd pin caused the power to stabilize too slowly for the programmer's liking. I always find the problem after replacing the chip, most often realizing it was something simple, and the chip was fine.

Ron