Instead of searching for the file, you must install the compiler toolchain. xc.h comes bundled with the compiler installation.

in your C source file, the compiler automatically detects the device you have selected in your project settings and includes the correct device-specific header (e.g., p18f2550.h p32mx795f512l.h Microchip Forums libxc/src/xc.h at master · qsnake/libxc - GitHub

library is a specialized header file central to Microchip's MPLAB XC compiler series

and select the version you need (XC8 for 8-bit, XC16 for 16-bit, or XC32 for 32-bit).

"configurations": [