Research of the past decades has shown that biodiversity is a fundamental driver of ecosystem functioning. However, most of this biodiversity–ecosystem functioning (BEF) research focused on experimental communities on small areas where environmental context was held constant. Whether the established BEF relationships also apply to natural or managed ecosystems that are embedded in variable landscape contexts remains unclear. In this study, we therefore investigated biodiversity effects on ecosystem functions in 36 forest stands that were located across a vast range of environmental conditions in managed landscapes of Central Europe (Switzerland). Specifically, we approximated forest productivity by leaf area index and forest phenology by growing-season length and tested effects of tree species richness and land-cover richness on these variables. We then examined the correlation and the confounding of these local and landscape-level diversity effects with environmental context variables related to forest stand structure (number of trees), landscape structure (land-cover edge density), climate (annual precipitation) and topography (mean altitude). We found that of all tested variables tree species richness was among the most important determinants of forest leaf area index and growing-season length. The positive effects of tree species richness on these two ecosystem variables were remarkably consistent across the different environmental conditions we investigated and we found little evidence of a context-dependent change in these biodiversity effects. Land-cover richness was not directly related to local forest functions but could nevertheless play a role via a positive effect on tree species richness.