Main problem with all-in-one's is that they're a lot like a laptop: you can't really touch the GPU or CPU.
Even if the six-core that you have will fit, is compatible and the PC even starts up, I'm almost sure that this is a recipe for disaster. That PC was designed with a specific TDP in mind; the one coming from the original CPU. If the new CPU has a higher TDP than your current CPU, you risk frying the CPU/ the motherboard/ other pieces near it.
Safety note: I don't own, didn't disassemble, and am not well read in all-in-one PCs. I'm speaking out of extensive hardware knowledge which I got over the years by lurking the net and tinkering with PCs and with laptops. At some points in my life, I encountered 2 all-in-one's.
My whole post is based on the above safety note, so be weary. That said, I'm pretty confident in what I said since the hardware design for an all-in-one resembles that of a laptop extremely much.
From what I know, you can upgrade the RAM and the storage (get a good SSD) for an all-in-one. Good luck!