Changing default project folder to NASdisk?

I’ve tried to change this as mentioned in this link:

https://community.platformio.org/t/how-to-change-default-new-project-location/2828

but I got an error when trying to send this in the terminal:

pio settings set projects_dir "\\NASDISK\media\2 - Måneds\02 PltfrmProj"

it wont accept “pio settings” copied from the terminal screen:

 pio settings set projects_dir "\\NASDISK\media\2 - Måneds\02 PltfrmProj"
pio : The term 'pio' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify t
hat the path is correct and try again.
At line:1 char:1
+ pio settings set projects_dir "\\NASDISK\media\2 - Måneds\02 PltfrmPr ...
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pio:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

WHat do I do wrong ?

Either execute the command in VSCode CLI where PIO is available or follow the docs to make pio visible in the normal system shell.

OK, now it seems to work, but when I compile some code, I get this in the lower right corner:

command ‘platformio-ide.build’ not found

OK; it seems like I just have to exit and try to compile some times - then it succeeded

THX

Usually that occurrs when a conflicting VSCOde extension is installed which overwrites some of the files in .vscode/… if that issue keeps re-appearing please let us know.

I just tryed again and unfortunately it’s still a problem !!!

Sometimes there is a message:

Activating the Pull Requests and Issues extension failed.

in that lower right corner too - it disappeares after some time

So that extension is problematic? What other extensions are installed?

I’m not aware of installing extensions !

OK, I installed the PlatformIO as extension to VSCode if that’s what you mean …

Now I’ve installed Arduino IDE, VSCode and PlatformIO on another machine from scratch.

Made a reference to my projectfolder on the NASdrive as shown in an earlier posting.

Opened a project from the project folder and trying to compile it …

it CAN’T even find the <Arduino.h> to include and lots of other errors !!!

Is this working at all on a network drive ???

In the past there have been known issues with that (PlatformIO now failing on mapped network drives).

What is exactly is the output when hit “Build”?

Just loading that project folder gives this:

[27.7.2021 18.11.00] Unable to resolve configuration with compilerPath: “avr-gcc”
[27.7.2021 18.11.00] Unable to resolve configuration with compilerPath: “avr-gcc”

Trying to compile gives this - copied from screen:

Compiling .pio\build\uno\src\main.cpp.o
‘\NASDISK\media\2 - M†neds\02 PltfrmProj\KS_AirPump_V5’
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
‘avr-g++’ is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\uno\libc2e\OneWire\OneWire.cpp.o
*** [.pio\build\uno\src\main.cpp.o] Error 1
‘\NASDISK\media\2 - M†neds\02 PltfrmProj\KS_AirPump_V5’
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
‘avr-g++’ is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\uno\libc2e\OneWire\OneWire.cpp.o] Error 1

It looks loke a “no go” to introduce a network drive for the project folder - right ?

Yeah so it’s still the same error as in the related topic. Last comments in Problem with Python 3.8+ on Windows when network drive is used · Issue #3417 · platformio/platformio-core · GitHub suggests it also isn’t fixed yet. Until then this won’t be working with PlatformIO.

Mama Mia … OK, I’m starting from scratch again, again … !

On my machine in my LAB I uninstalls VSCode completely - re-boots, and starts my Arduino IDE to see if compiling here works and have libs installed … all seems OK !

Then I installs VSCode again … changing nothing … when installed, installing extension PlatFormIO and exits VSCode.

When I starts again, PlatFormIO has NOT made a default project folder in the users documents !!!

Instead it somehaw can remember my last attempt to have a project folder on the network - but I deleted that … so where is the projects now ???

I think this PlatformIO / VSCode is tending to be just a little TOO hard a tool to use …

What is wrong with VSCode or PlatFormIO or … (the un-thinkable) …ME ?

Does pio settings get still show the project_dir to be on the network drive?

How can I check that - OK, I found out … but I think I did set it when I saw I had not made it by install.

But something bad has happened because now the compiler cant even find <Arduino.h> the includePath is missing … I’m sure I did NOT delete that.

I thought I could start fra SCRATCH as told in the last postings - how can I do that ?

If you remove the VSCode PIO extension, then delete your C:\Users\<user>\.platformio folder fully, re-open VScode and re-install the PIO extension, that should give you a clean install.

Remember to build the projects at least once before concluding something is broken – intellisense can trick you and is not updated until a build is done (or Ctrl+Shift+P → Rebuild IntelliSense).

1 Like

That did the job - BIG THX !
When I saw that “.platformio” I noticed too the “.vscode” and deleted that too AFTER UN-unstall VSCode.

The new installing of both VSCode and PlatFormIO extension was fram SCRATCH and it seems so too !

THX for your time and patience !