NOVELTY - A solid-state p-n heterojunction comprises an organic p-type material in contact with porous layer of n-type material. The thickness of the porous layer of n-type material is greater than or equal to 2 mu m. The pore-filling-fraction of the porous layer of n-type material by the organic p-type material is not greater than 50%. The heterojunction is sensitized by at least one sensitizing agent; and comprises at least one ionic additive.    USE - As solid-state p-n heterojunction; in an optoelectronic device, where the optoelectronic device is solar cell or photo-detector (such as solid state dye sensitized solar cell and/or solid state polymer sensitized solar cell), photovoltaic cell or light sensing device; and in the formation of a solar cell (claimed).    ADVANTAGE - The n-type material has a surface area of 1-1000 m2g-1 and preferably in the form of an electrically continuous layer; and has thickness of 2-30 (preferably 2-5, especially 2-3) mu m. The heterojunction is constructed which function with good efficiency even when much thicker than expected (e.g. when greater than or equal to 2 mu m); is effective and has pore filling fraction (PFF) of less than or equal to 0.5-30 or 1-20%; and has charge collection efficiency (CCE) of at least 50% (e.g. 50-99%), preferably at least 60% (e.g. 60-98%) and especially at least 70% (e.g. 70-98%).    DETAILED DESCRIPTION - An INDEPENDENT CLAIM is included for manufacturing the solid-state p-n heterojunction involving coating anode (preferably transparent anode e.g. fluorine doped tin oxide-FTO anode) with compact layer of an n-type semiconductor material, forming porous (preferably mesoporous) layer of n-type semiconductor material on the compact layer, optionally surface sensitizing the compact layer and/or the porous layer of n-type material with at least one sensitizing agent, optionally treating the compact layer and/or the porous layer of n-type material with at least one ionic material such as lithium salt, optionally forming porous barrier layer of insulating material on the porous layer of n-type material, contacting the porous layer of n-type material with at least one solution of polymeric organic p-type semiconductor material to form a layer of polymeric organic p-type semiconductor interpenetrating the porous layer of n-type material, optionally treating the layer produced in f by coating on top with solution of ionic material, such as Li-TFSI, and forming cathode (preferably metal cathode e.g. silver or gold cathode) in contact with the p-type semiconductor material.