the first thing to keep in mind about free rider problems is that in many cases someone pays. if Europe is really free-riding on Iran defense, then despite the free rider problem the US *did* pay for it. this may violate someone's sense of fairness. however, if i want to buy something, and it happens to benefit others, and i know they won't consent to pay for it, and i still want to buy it at full price, that is perfectly reasonable.
the second thing to keep in mind is that what projects should be done is a tricky question. there are more available projects than their is wealth to complete them and we need to try to choose the best ones. so if a project doesn't get completed for whatever reason (such as people who stand to benefit refusing to pay for it), even if the project seems valuable, that does not prove anything has gone wrong.
the general solution to deciding which projects should be done is individualism. people complete whatever projects they want to using their own resources and free trade. this works well because it lets people put their knowledge to use if they believe it's important without having to convince the world, and the people who are more successful at their projects end up wealthier and thus more able to do more projects.
the general solution to free rider problems, and to selling things to people in general, is to use creativity to persuade people to trade with you.
some people believe the government is the solution to free rider problems. they believe that by applying force to make the project be completed, they can improve the situation, by making good things be done that wouldn't have been done otherwise. however, there is no guarantee the government will sponsor the right projects. governments have no special knowledge about which projects should be completed. governments also have problems with accountability and efficiency.
a critical issue besides which projects should be complete is: how should they be funded? when a government intervenes by force and takes $100 from all the farmers to build a dam, even if the dam ought to be built, this still may be the wrong way to build it and a bad deed. funding projects in good ways requires creativity.
the only way that force could be necessary, in principle, to make the right thing happen is if there were right things such that they should be done despite their being no possible way that anyone, or any group of people, would freely pay for it with his/their own wealth. if that's the case, in what sense is it really the right thing to be done?