This paper studies an environment in which the network structure of production - who buys inputs from whom - is determined endogenously and is the key determinant of aggregate productivity. I address two questions: How do contracting frictions shape the equilibrium network structure? And conversely, how does an economy's network structure shape the impact of contracting frictions? In this environment, a more severe contracting friction may cause producers to favor and direct search effort toward the "wrong" suppliers, leading them to use lower-productivity techniques or higher-cost inputs. The impact of a marginal reduction in contracting frictions depends on the length of supply chains. When supply chains are longer, and wedge between buyer-supplier pairs is magnified. In turn, the length of supply chains in equilibrium depends on the the severity of contracting frictions. For some parameter values, network externalities and thick-market effects amplify the impact on aggregate productivity.