Spherical ablator shells that contain a thin layer of ultralow-density polymer foam have recently attracted attention in the inertial confinement fusion (ICF) community as they can be used to bring dopants for diagnostics and nuclear physics experiments in direct contact with the deuterium-tritium (DT) fuel or to study new ignition regimes by enabling the formation of uniform liquid DT fuel layers. We developed a method to fabricate these foam-lined ablator shells using a prefabricated ablator as a mold to cast the foam liner within the shell. One crucial component of this new approach is the removal of solvent from the ablator shells without collapsing the ultralow-density porous polymer network. Here, we report on a supercritical drying approach with liquid carbon dioxide that provides critical information on how to produce thin layers of low-density polymer foams in ablator shells for ICF experiments. Diffusion experiments were used to study the time required for complete solvent exchange in 2-mm-inner-diameter diamond shells and the data were used to demonstrate the fabrication of uniform porous polymer films inside ablator shells.