A branching fraction measurement of the B0→D+sπ−B0→Ds+π− decay is presented using proton–proton collision data collected with the LHCb experiment, corresponding to an integrated luminosity of 5.0fb−15.0fb−1. The branching fraction is found to be B(B0→D+sπ−)=(19.4±B(B0→Ds+π−)=(19.4± 1.8±1.3±1.2)×10−61.8±1.3±1.2)×10−6, where the first uncertainty is statistical, the second systematic and the third is due to the uncertainty on the B0→D−π+B0→D−π+, D+s→K+K−π+Ds+→K+K−π+ and D−→K+π−π−D−→K+π−π− branching fractions. This is the most precise single measurement of this quantity to date. As this decay proceeds through a single amplitude involving a b→ub→u charged-current transition, the result provides information on non-factorisable strong interaction effects and the magnitude of the Cabibbo–Kobayashi–Maskawa matrix element VubVub. Additionally, the collision energy dependence of the hadronisation-fraction ratio fs/fdfs/fd is measured through B¯¯¯¯0s→D+sπ−B¯s0→Ds+π− and B0→D−π+B0→D−π+ decays.