I've been having this issue with Visual Studio 2022 17.12.0 Preview 3.0, out of the blue, it started happening, and now it also happens on older versions of VS... The solution above (manually adding the includes and libraries to the project worked): https://stackoverflow.com/a/51555483/15250920