IDE states I need to define a programmer

There is a bug in Arduino IDE 2.x that causes it to cache menu information from old versions of programmers.txt. This caching can result in "phantom" entries in the Tools > Programmer menu, even though there is no definition for that programmer in programmers.txt. When you then attempt an "Upload Using Programmer" operation, it fails with this type of "Programmer ___ not found" error.

I'll provide instructions you can follow to clear the IDE's menu cache:

  1. If Arduino IDE is running, select File > Quit from the menus to close all IDE windows.
  2. Delete the folder at the following path:
    C:\Users\<user name>\AppData\Roaming\arduino-ide
    
    (where <user name> is your Windows user name)
    :exclamation: If looking for it with your file browser or command line, note that the folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  3. Start Arduino IDE.
  4. Select the appropriate board from the Tools > Board menu.
  5. Select the appropriate programmer from the Tools > Programmer menu.
  6. Select Sketch > Upload Using Programmer

Hopefully this time the upload will be successful.