by robosang » Tue Sep 25, 2012 7:54 pm
You should try what yonghui suggested.
There is no problem with the UIC00B, this is due to MPLAB IDE. It will detect whether the target PIC have power or not before loading program, the standalone PICkit2 Programmer have different method. If you check the schematic of PR11, the VCC or 5V of circuit is not connected to the ICSP socket, in other words, the UIC00B pin that detect power is floating and will not detect the target is being powered.
There are a few method to overcome this, but I prefer using the PICkit2 Programmer GUI.