Trouble profiling one of Perf SDK samples in NSight Graphics

I’m trying to build one of the DirectX12 samples from the NSight Perf SDK samples, and then to do a C++ capture to profile it. Or to just do a GPU Trace of it.
What is happening is I can successfully build the sample, using CMake to generate the Visual Studio 2019 solution, and build. I can even RUN the executable from within VS (x64, debug). But I can’t run the .exe outside the solution, (no error, nothing happens), or even trying to connect to it from within NSight Graphics doesn’t work, and gives the following error:
(I’m on Windows 10. RTX3060, Studio Driver 535.98) The sample is this one: NVIDIA_Nsight_Perf_SDK_2023.3_Public_Windows\Samples\D3D12\D3D12Raytracing

Thank you for any help :-)

On a possibly related note, I wanted to try profiling something heavier, so I loaded THE MATRIX environment into the UNREAL engine, packaged it to an .exe. I ran the “game” by connecting to it via NSight Graphics, and did a C++ dump. I built the VS 2019 solution, but I’m unable to run it, not even from within VS 2019. The error I get there is shown below. I tried copying the D3D12core.dll and D3D12SDKLayer.dll file from the AgilitySDK\bin\x64 folder to where the .exe was, and run it again, no luck. I suspect some kind of DirectX DLL path issue in both cases. Maybe I’m wrong. I don’t know how to fix this. Any help appreciated :)

D3D Error 887e0003: (16336@4613671) at 00007FFA7E629570 - Missing D3D12GetInterface Export from D3D12Core.
onecoreuap\windows\directx\dxg\d3d12\d3d\module.cpp(520)\d3d12.dll!00007FFA7E629595: (caller: 00007FFA7E6295F5) LogHr(1) tid(3fd0) 887E0003 The D3D12 SDK version configuration of the host exe is invalid.
Msg:[Missing D3D12GetInterface Export from D3D12Core.]