Work faster so you can go inside! With gnats and mosquitoes bug spray can help a little but I almost never use it. The best thing to do is to keep moving. If you stand still they will be all over you. Sometimes they are so bad just getting in your vehicle will let tons of them in with you. My tip is to turn the AC up all the way, once it gets cold they quit flying around so you can relax.
Now for the biting flies (yellow flies and horse flies) there's not much you can do but be ready to hit them before they bite. Pay attention to anything landing on you because they are quick and the bite stays for days.
Be careful in the heat if you're from somewhere cooler. I work outside everyday and still have trouble with the heat sometimes.