Disclaimer I am very new to C++ and Visual Studio

I was given a project repository in which CMake (3.31.11) and vcpkg (2026-03-04) are configured for Visual Studio 2022.

After the initial cmake -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg/scripts/buildsystems/vcpkg.cmake .. everything is loaded correctly and a .sln file is created which I open with Visual Studio 2022.

This works and the subprojects are correctly displayed in the solution explorer. I can also instruct Visual Studio to build a subproject. Which runs successfully and the application starts.

So it seems that everything worked on the build tool side. But sadly it seems like that Visual Studio does not register the used NuGet dependencies, especially the DXC shader compiler.

The Microsoft.Direct3D.DXC dependency is correctly downloaded and seems to be used by the build process. But the "NuGet Package Manager" window for the subproject does not show any installed dependencies and the solution explorer does not show the configuration option for the .hlsl files in the properties page. Sadly this leads to the problem that it shows .hlsl syntax errors, which are incorrect, since it builds and runs correctly.

Is there a way to instruct Visual Studio to read those NuGet packages and then to correctly evaluate the shader file?

Feirell's user avatar

3

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.