File menu - Save As.. Fails to save chosen board

2.0 on Mac Saving sketch:
"Save As." Works as expected except renaming file makes an identical sketch but the chosen board and chosen serial port is not saved with the sketch. (I think this always worked on 1.x versions)

I got curious about what you reported and was checking it. IDE 2.0 RC9.1 appears to treat SaveAs like a new file, with no board specified. However, once you set a board, it remembers that, and when you reopen your project it will be automatically set to that board.

IDK if that is a good or bad thing, because someone doing a SaveAs might be wanting to make some mods for a different board type, for which not having it preset would be desirable.

The board/port must be saved somewhere other than the project itself, because nothing in the folder changes once you set it.

  • Wes

Hi @andrewashe. The Arduino IDE developers are tracking this issue here:

There is a related proposal here about using a more reliable approach to board and port selection similar to how Arduino IDE 1.x does it:

It isn't that it is not preset, it is that it reverts to whichever board you had selected when you started the IDE that session. That might be "No board selected", but it could also be any other random board associated with the sketch the IDE opens with.

I believe it is somewhere under this "user data" folder because the board and port association is lost if I delete it. The IDE then has "no board selected" when the sketch is opened:

Windows

%APPDATA%\arduino-ide\

(e.g., C:\Users\<user name>\AppData\Roaming\arduino-ide\)

Linux

~/.config/arduino-ide/

macOS

~/Library/Application Support/arduino-ide/

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.