Many-task optimization problem is a kind of challenging multi-task optimization problem with more than three tasks. Two significant issues in solving many-task optimization problems are measuring inter-task similarity and transferring knowledge among similar tasks. However, most existing algorithms only use a single similarity measurement, which cannot accurately measure the inter-task similarity because the inter-task similarity is a concept with multiple different aspects. To address this limitation, this paper proposes a bi-objective knowledge transfer framework, which aims firstly to accurately measure different types of inter-task similarity using two different measurements and secondly to effectively transfer knowledge with different types of similarity via specific strategies. To achieve the first goal, a bi-objective measurement is designed to measure inter-task similarity from two different aspects, including shape similarity and domain similarity. To achieve the second goal, a similarity-based adaptive knowledge transfer strategy is designed to choose the suitable knowledge transfer strategy based on the type of inter-task similarity. We compare the bi-objective knowledge transfer framework-based algorithms with several state-of-the-art algorithms on two challenging many-task optimization test suites with 16 instances and on real-world many-task optimization problems with up to 500 tasks. The experimental results show that the proposed algorithms generally outperform the compared algorithms.