Military service in Switzerland is compulsory regardless possible other nationalities a citizen holds. Dual citizens are therefore not exempted. If, however, you have done military or civil compensatory service abroad, you are barred from personal service in Switzerland, but still be subject to the compensation tax.
Several countries have agreed to bilateral treaties with Switzerland concerning military duties of dual citizens. If applicable, those regulations have priority.
Austria, France, Germany & Italy
A dual citizien usually fullfills his military duties only to his home country of residence at his 18th birthday. He can opt to enlist in the armed forces of the respective other country. Those who fulfilled their service duties in one of Switzerland's neighbouring countries are exempt from personal service and compensation tax.
The situation of Swiss-German citizens remains unclear. After Germany ratified the applicable treaty concerning military service of double citizens, it suspended its own military draft. The treaty's interpretation in light of this development remains unclear as of May 2014.
Affected students, moving from Germany to Switzerland for their studies, are advised, upon registration with the record section:
1. to address the military section chief (same floor);
2. to explicitely invoke the treaty;
3. to hand in a copy of valid german identification and proof of residence in Germany.
As of May 2014(!) you will then not be drafted until your official duty has been settled.
United States of America
A Swiss Citizen born in the US and therefore holding US citizenship as well is exempted from service obligations during a stay in Switzerland of at most two years. For longer residences, the above-mentioned common provision applies.