A new approach to produce porous membranes with dense or porous top layer is proposed in this work by employing a solvent-free method. PMMA/MAM formulations were selected as a base material in order to create open-cell or close-cell structures by gas dissolution foaming employing CO2 as a blowing agent. Furthermore, by introducing the gas diffusion barrier approach to CO2 dissolution foaming, it is possible to control the thickness of the dense layer in both edges, obtaining defect-free membranes (i.e., completely dense without pin-holes). The effectiveness of nanocellular polymers as gas separation membranes was evaluated. In this way, the permeability, selectivity, and permeance were correlated to the cellular structure (open or close-cell) as well as to the dense layer thickness. Furthermore, the effective thickness of the selective layer has been calculated from gas permeability measurements, obtaining an accurate control of that parameter from the tunable cellular structure. Therefore, membranes composed of desired selective layer and a porous structure as a mechanical support are produced by a solvent-free methodology.