If you find yourself getting the error message:
Error: Detected a whitespace character in project paths then you have one of two options (that I know of):
- Create a new user profile with no whitespace in the name, and set up your entire development environment again (not cool).
- Change the install path of the platformio compilers.
Option 2 sounds a lot simpler on the face of it, but since the compilers typically live under your user profile, ec:
C:\\Users\\Some Body\\ this is a bit more complex. The following can and may cause side effected depending on what programs you have installed on your computer, and I recommend only doing it if you are a really confident tinkerer.
Since the issue with the toolchain is often down to whitespace in the user path, you need to remap your user home directory to remove any whitespace characters. Apparently this is not recommended by Microsoft, so caution is advised:
- Log out of the affected user account
- Log in as a different Administrator account
- Rename the offending folder, for instance adding a dash:
- Fire up regedit.exe
- Find the entry for the user account you want to change under
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\\<User SID>\\. You can find the
\<User SID\>ahead of time, but it's easy to browse through to identify the right account from the ProfileImagePath shown
- Modify the ProfileImagePath to match whatever you set in
- Log out of the administrative account and log back in to the user account you've been operating on. Note that the display name will not change, so you'll still be logging in to
- Uninstall VS Code, and re-install it. VS Code keeps a record of the install location and context menu entries and updates will be broken till it's re-installed - arguably a small price to pay for not having to create an entire new user account!