Frame Capture - D3D12 SDK version configuration error

Hi all,
I’m trying to analyze a frame with the C++ Frame Capture, from the Unreal Engine - City Sample (The Matrix), using NSight Graphics 2024.1.1 After a few glitches (atlbase.h not found, the aftermath DLL file in the wrong place), I got it building in Visual Studio 2022. When I run it I get the following error returned in Resources00.cp, at the My_D3D12CreateDevice(…) call:

The D3D12 SDK version configuration of the host exe is invalid"

I used the NuGet package to install the latest DirectX Agility SDK directly inside Visual Studio 2022. I updated my NVidia drivers to 555.99, rebooted.

Oh, how funny. I realized I asked a very similar a year ago! No replies then. I guess the problem still exists. :-\

Hi bfx,

Thank you for using Nsight Graphics and providing your feedback. We are sorry for any inconvenience you have encountered.

That’s weird, we have some internal test about UE 5.4.1 CitySample, Nsight can do C++ capture, build and run smoothly as expected.

Do you have any special settings/modifications about your UE project?


Hi An,

Thank you for your reply. No, I don’t recall changing anything. I’m using UE5.3, so I’ll upgrade to 5.4.1 to see if that makes a difference. I’m using the “Small City” level, in the CitySample, just FYI. I’ll try upgrading UE and check my project settings today and report back here. Thank you again!

Ok, I see what’s going on here, mostly.

  • There is a certain workflow expectation that must be followed, as specified in the user docs. Namely: Do everything from inside NSight Graphics, using the ***.ngfx-cppcap file. Building, Executing, Connecting to Activites, etc. This is super important, because the NSight Gfx tool sets up paths to DirectX DLLs, the Aftermath DLL, etc. If you don’t go through NSight, the environment won’t be set up properly, and the DirectX errors (and others) I mentioned above will happen. I was able to get everything working once I figured this out.

  • What I was doing, was thinking, "great! C++ frame capture gave me standalone source, with a CMakeLists.txt file, I’ll just run Cmake, generate a Visual Studio Solution file, be able to debug from inside Visual Studio, OR use it to build a standalone .exe that I can use Nsight to profile/debug. No, not really. (Not easily anyway). That’s where I got into trouble with DirectX Agility DLL versionitis, etc.

  • Another oddity was when I clicked Open IDE from inside NSight, it opened it in Visual Studio, but as a CMake project, not a VS Solution with VS Projects, VS properties, etc, the usual familiar Visual Studio workflow. I couldn’t quite (easily) figure out where the runtime folder was where I could copy the Aftermath DLL to, get around the Aftermath DLL Not Found issue.

  • Another unexpected behavior was when I clicked Open IDE again, it started up ANTOHER instance of Visual Studio with the code, even though I already had one instance running. It should have just un-minimized the VS session I already had.

  • Another suggestion is that I see an EXECUTE button under the RUN section, but no STOP button. It would be nice to control execution of the application being from inside NSight, since that’s what people are being encouraged to do: use Nsight Gfx as the main control panel.

  • Finally, I didn’t really see any error messages in the Output Window when I was trying to run from inside the IDE (triggered by the Open IDE button). In fact I never was able to run from inside the IDE for the reasons I mentioned above.

Sorry to be nit-picky, this is just a brain dump of my experience and hopefully useful feedback on workflow improvements, or to help others with the same issue.