Projects stored on the network?

I’m very new to this PlatformIO in Arduino programming, but I love that IntelliSence like editor !

How ever I want to have my projects stored on my NAS-drive as default.

I think it’ll make a mess if I just move the PlatformIO folder from Documents to teh NAS - just like in VS C# - I have very bad experience doing that.

Is it good practice and if so, where is it done ?

There have been multiple reports about problems with using network drives and the associated UNC paths because some portions of the build process rely on the cmd.exe, which does not support UNC paths and fails (PlatformIO now failing on mapped network drives - #4 by jackb).

If that has been solved now, idk.

As a test you should first use the “New Project” button in VSCode to create a project on your network drive and attempt to compile and upload it once. You can uncheck “Use default location” and point directly to the folder in which you want the project folder to be stored.

If successful, The default project directory can then be changed as seen in docs. When you open a PIO CLI and execute pio settings get you should see the current value of projects_dir. Then use the command pio settings set projects_dir <new path>, with the correct quoting if the path contains spaces, to set a new path, e.g.

pio settings set "D:\my platformio projects"

THX for your quick and detailed respond - I’ll try in the next few days.

Oh, it’s way out of my skills to do these changes :flushed:

This does not work. pio resolves the path to the UNC path before storing it:

Commit Improved support for projects located on a network share // Resolve #… · platformio/platformio-core@4687665 · GitHub looks like it wants to fix this. Does the issue persist after using a CLI to do a pio upgrade --dev and retrying?

I was JUST posting a link to this change when I got a warning the link was posted. LOL.

I haven’t tried, and I’m not that keen on trying it out myself (i’m not a python guy by any means, and finals are coming up…focus focus focus). I may just do the registry fix for now, until the change makes it into a release.

But thanks !

No need to change any Python files in PlatformIO, I was just referencing the commit that was supposed to fix it. Doing a pio upgrade --dev is the only thing you need to do for an upgrade, and it’s very safe in my opinion, I’m constantly on the latest dev version.

OK. I was being tired and lazy. I did it. It fixed the paths. Thanks for the nudge!

This works for a new project but not for an old one because .vscode json files are not generated when the project is opened. It seems that tpls files are not executed when a project is loading from a network drive.
I also noticed that if a .vscode json file, like c_cpp_properties.json is deleted, a new one will not be generated when project reloads.

It’s a pity for old projects. Worse, this breaks automatic add path to intellicense when adding librairies to the project.
However, this commit is a very good news for University because all of our students have their files on the network.