I took over a C++ code which is in a solution. That one solution contains many projects. I edit a .cpp file, but can’t file which project it belongs to, so I don’t know which project to build. Building the whole solution takes a long time. How do I find out which project a .cpp file belongs to?
Share
Well I think this is kind of the point of
.vcxprojfiles. The projects<->files relationship is many-to-many. That is, a project contains many files, but also, a file can belong to many projects (in the same solution).So I’m not sure if you can do this in an easier way, but you can right click the tab of the file you need to know about, and select “Open containing folder“, see which project folder that file resides in, and assume it belongs to that project.