How to fix IDL file generated header file not available compilation issues in VS 2022?

James J 606 Reputation points
2023-04-13T13:04:02.1133333+00:00

We are in the process of upgrading VS 2019 to VS 2022. When we compile the projects, one of the C++ COM IDLs that created the HostObject_h.h file is not available. Ideally, an IDL-generated file should be available at compile time for the reference. But, we have observed that when compiling VS 2022 17.5.3, we are getting the below error. fatal error C1083: Cannot open include file: '..\HostObject\ HostObject_h.h': There is no such file or directory. HostObject_h.h --  It seems to be that this was failed at the first time of rebuilding, but after that HostObject_h.h. file was available, we were not getting the error. Every time we rebuild (clean and build), we get the same error. Any suggestions on this? I do not see any issues specific to VS 2022 installation, All the required CMake, SDK, C++/CLI, v143 platform tool set selected. I am not getting clue as to what changed from VS 2019 to VS 2022 for this issue. I have checked all the project properties. We have only updated the SDK and Platform Tool versions vcx projects.

Developer technologies | C++
{count} votes

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.