Thanks for the detail.
The ESP32 board package changes between its versions quite a lot even within 2.x, and the 3.x is a larger restructure of it all (along with shifting IDF versions beneath).
Cleanup As you have copied files into the project which are from the 3.x package I would suggest removing those from the project via Solution Explorer to begin with as they will be adding to the confusion for both intellisense and compilation. Once they are removed and the board package is the same version as before then this should work.
Also disable the Serial Debugger in vMicro, just in case this is causing any confusion (it shouldn't, but to be safe...).
If it seems like some components aren't being uninstalled correctly, close VS, and delete the %LOCALAPPDATA%\Arduino15\packages\esp32 folder entirely, then open VS and reinstall the board package.
Intellisense The fact the compiler did not find the files is an issue of its own, and should be resolvable without the need to clone core files into the project (allowing simpler upgrades when needed).
IDF Versions The 2.0.17 board package is built upon IDF v4.6, and each board package version contains the IDF components it was built with. It cannot be used like a library or component, it is what the board package is built with so it all fits together as one unit.
Arduino Core Version | ESP-IDF Base Version | Notes |
v2.0.0 | ESP-IDF v4.4 | First stable 2.x release |
v2.0.1 – v2.0.6 | ESP-IDF v4.4 | Bugfix and incremental updates |
v2.0.7 – v2.0.10 | ESP-IDF v4.4.2 | Stability improvements |
v2.0.11 – v2.0.14 | ESP-IDF v4.4.3 | Widely used in production |
v2.0.15 – v2.0.16 | ESP-IDF v4.4.5 | Late-stage bugfixes |
v2.0.17 | ESP-IDF v4.4.6 | Final 2.x release; most mature v4.4.x base |
Arduino Core Version | ESP-IDF Base Version | Notes |
v3.0.0 | ESP-IDF v5.0 | Major changes: drivers, components, APIs |
v3.0.1 – v3.0.7 | ESP-IDF v5.0.x | Gradual bugfixes and compatibility work |
v3.1.0 | ESP-IDF v5.1 | Major feature update |
v3.2.0 | ESP-IDF v5.1.2 | Most stable 5.1-based release |
v3.3.0 (upcoming) | ESP-IDF v5.2.x (likely) | More IDF 5.2 support (Matter, BLE Mesh, etc.) |
Future Final Solution This is the ideal scenario (once working again) to recreate the project and its' board package as a Portable Solution, so the Solution, Project, Board Package and all libraries live in an isolated folder, separated from your normal board package and library installs:
Documentation: https://www.visualmicro.com/page/New-Arduino-Portable-Solution.aspx Video Guide: https://www.youtube.com/watch?v=PEkaumrbFAc This can be done in-place without the wizard by closing the solution and creating a few folders as shown here, then re-installing the boards/libraries needed:
Documentation: https://www.visualmicro.com/page/How-to-Encapsulate-a-Board-Package-with-a-Solut...