Thanks for the info. You are bumping into the windows max path size. The limit is 32k for the entire command and a MAX_PATH of 256 bytes for each file name and path
The older esp32 toolchains work close to the windows limits, that is compounded by the long project name and long user name in the "c:\users\[your name]\appdata" folder.
Below the appData folder are folders where 1) intalled arduino board packages are located and 2) visual micro stores temp build files.
We are considering changing how we make the name of the temp build folder for each project because of this problem.
The arduino ide will be on the limit, although they have already moved to a slightly shorter temp build folder structure, which is why it hasn't hit the limit yet. You might find that adding one or two more libraries will cause its limit to also be hit.
The easiest way to resolve the issue should be to change the location that visual micro uses for the build temp.
The location you choose should be well away from any project code because you or vmicro might delete the cache at any time.
For example:
- Create a folder called "C:\Junk". the "option tools>options>visual micro". Under the Compiler section of the Visual Micro settings there is a property called "Build Folder". Set it to "C:\Junk\VMBuilds"
- Click OK then run a build.
That should work. In our test, we hit the problem with less libraries than you are using but the issue should be the same.
If there is still an issue then we can explain how to move the esp32 board package (toolchain and libraries). The board package folder has many of the libraries you are using the the freertos files are in quite deep sub folders. The package is currently in "C:\users\[your full name]\appdata\arduino15\packages\esp32...".
With arduino2 you can also control where the board packages are located. That would allow both visual micro and arduino2 to use the downloaded packages if preferred.