No. Compensating CO2 by financing cook stoves and solar panels is fine, if they replace energy generated using fossil fuels and, on the condition, that they are certified. Afforestation is another way to do that. When it comes to programmes to plant trees, please be alert of the quality of the programme: are they really planting extra sustainable forests? Are they taking the rights to land of local and indigenous people into account? If you are interest, check out this article by Friends of the Earth.
The most important thing we want to stress, it that compensation should not imply that it is no longer necessary to reduce personal CO2 emissions. The problem is that companies love to talk about compensation in their CSR policies, risking they invest most climate budgets in compensation projects rather than reducing their emissions. We can never avoid climate change by compensating all current CO2 emissions. In view of the necessity to reach the targets set in the Paris agreement, CO2 compensation projects should go hand in hand with reducing CO2 emissions, both by companies and at personal level.