This study aims to investigate the mediating effects of both affect-based and cognition-based trust on the relationship between using a transformational leadership style and the effectiveness of followers' knowledge sharing processes (i.e., knowledge donating and knowledge collecting). Using data collected from 287 employees at 32 pharmaceutical companies in Pakistan, the structural equation modelling (SEM) technique was utilised to analyse the hypothesised relationships. The results showed that leaders with a transformational leadership style directly affect their followers' knowledge donating and knowledge collecting processes. In addition, affect-based trust was found to fully mediate the relationships between transformational leadership and followers' knowledge donating and knowledge collecting processes, while cognition-based trust produced insignificant mediation effects. From a social exchange perspective, these findings demonstrate the importance of focusing on building affect-based trust between leaders and followers in order to develop transformational leadership that could positively influence the knowledge sharing process.