Thanks, Simon,
I added that extra search path, and did a build. First time, it found that header file, but then failed with the same symptoms as my other (non portable) problem (did not build the two .cpp files), but then I tried it a second time (after deleting - building - and restoring that search path) and it built quite fine, and went on to do so for several more tries. Possibly something to do with histories stored in that .vs folder you mentioned.
The object file is a (slightly) different size to that built in the non-portable environment. Should this be of concern?
Then I downloaded esp32 V3, and retried the portable build - SUCCESS! Huge step forward.
So then I went to put these two folders away in a "frozen" repository. I picked up the non-portable, moved it, opened it and it built OK. I picked up "arduino-portable" and it failed first time, but then - move it back - build it in the original place (OK) - move it out again into "Frozen" and now builds OK.
Reminds me of the old joke about the software engineer, the electronics engineer, and the civil engineer
But I still cannot get my simple copy of my base solution working... (Reminder: I created a new VMicro solution in VS, copied my 5 source files into it, set up the relevant board, etc, and pressed "go"). Solution Explorer clearly shows the .ino, 2 .cpp files and two headers, the build log flags a number of errors and warnings associated with the cpp files (so presumably is aware of their existence) but simply refuses to include them in the build. (The "good" copy lists the .ino and 2 .cpp at the point where the log says "Building Project Code", whereas this copy just lists the .ino). I have re-attached the build log.
Also, can you clarify the "Ensure All files in project" thing? On the VMicro drop-down (I can't do a screen shot because the drop down won't persist) there is a box on the LHS with a green arrow in it. If I click the box, the drop-down closes with no visible feedback of any sort. When I look again, the tick is still there. I don't recall ever seeing the box without the tick. Not quite what I understand as "a button that needs to be clicked to...(do something)". I also notice the file names in Solution Explorer sometimes have a red tick next to them, sometimes not, but doesn't seem to affect the build process.
And again I repeat my thanks to you for your patience and insight in working me through this! If we can just solve this last issue...
Roman