This is done for instance in Serre's Algebraic Groups and Class Fields, ch. II, §11. As Serre himself observes, the proof is somewhat artificial; a more elegant one is given in Tate's Residues of differentials on curves, Ann. Sci. E.N.S. 1 (1968), 149-159.