I had fungus gnat issues in an office setting, where I had about 7 or so infested plants. I got rid of them by placing my plants outside for about a week. I live in NYC and these were cold autumn nights. I also kept the soil as dry as possible as well, but I didn't add anything to the soil to get rid of the gnats. That said, I lost two plants due to the cold overnights/lack of usual watering and I didn't monitor them as well as I should have. The rest of the plants survived the week outside and I brought them back in before it got colder and all the fungus gnats were gone. I would suggest this if you know your plants can survive cold temperatures and your outdoor area isn't a source of fungus gnats in the first place. The area I used was outside an office, where it was no greenery or soil existed.
Another two options to deter fungus gnats from mass producing:
1. Topping your soil with sand, which deters the gnats from laying their larvae, as they can't travel through the sand. I'm not sure exactly what kind of sand is ideal here, but I've seen this suggested many places. I haven't tried this, but it seems to make sense.
2. Watering your plants from the bottom, which would keep the top portion of the soil dry, which is an unideal environment for fungus gnats. You should make sure you water only enough for the plant to completely absorb all the water, as standing water should be avoided.
I would also say if you don't have any fungus gnats, please focus on prevention as that is a much easier endeavor than having to get rid of them. I share an office with about 20 other people and nearly everyone has their own plant and not everyone is careful with new soil/plant introductions to the office. It only takes one purchase of a infested plant to create an issue for everyone. My buddy just bought a plant for his desk from Whole Foods and I noticed a couple fungus gnats and I'm trying to convince him not to water it as much, as he chooses not to isolate the plant.
I'm now worried my plants (now numbering about 15) are going to get infested again.
Also, when you purchase potting soil mixes, before you use the mix, I would suggest inspecting the mix closely and even isolating the soil in a pot for a few days before using it. Some mixes are infested already and you would not want to use this without treating the soil or if you can, returning it back to the sellers. Dry soil would probably not have any gnats, but some mixes are kept moist on purpose and this may present an ideal haven if its already infested.