Was the US ever at war with France?
Third Treaty of San Ildefonso
From 1798-1800, France and the US waged an undeclared war at sea, the so-called Quasi-War which was ended by the Convention of 1800 or Treaty of Mortefontaine. The US viewed French ambitions in North America with great concern, since with British Canada to the north, they wanted to avoid an aggressive and powerful France replacing Spain in the south. For commercial reasons, Napoleon wanted to re-establish France in North America, the November 1801 Saint-Domingue expedition being the first step. The March 1802 Treaty of Amiens ended the War of the Second Coalition and in October, Spain transferred Louisiana to France.
Convention of 1800
The 1778 Treaty of Alliance between France and the United States agreed that in return for French support in the American Revolutionary War, the US would defend French possessions in the Caribbean against foreign aggression. This meant the US was obliged to support France against their opponents in the 1792–1797 War of the First Coalition, which included Britain and the Netherlands, maritime Powers with bases in the Caribbean.