I'm getting this error when I compile this code.

D3D12CreateDevice(pAdapter, D3D_FEATURE_LEVEL_12_0, IID_PPV_ARGS(&pDevice)). Error! No such Interface supported

I've got a rtx 2060 GPU installed in my computer. All my GPU drivers are up to date. I've got the windows 10 version 1803(OS Build 17134.590) I've got visual studio 2017 installed and used to compile my code.

Here is the code I'm trying to compile. https://github.com/acmarrs/IntroToDXR

What, in the hell is this error man its so stupid. I've been stuck for over 6 damn hours man. Any help, much appreciated.

Your card & driver may support DirectX 12 (the API) but may not support the Direct3D Hardware Feature Level 12.0 feature level. Most of the sample code for DirectX 12 uses D3D_FEATURE_LEVEL_11_0 as the minimum required hardware because that's the one that's most often supported.