3

Is there a way to preserve CPP files in project included (Include In Project) and exclude them from build process? The reason is, I want to go through the source (F12 - Go To Definition) of external libraries to see the implementation, however, the libraries are already built and I do not need to set-up the project to rebuilt them, I just need to include headers only.

Edit: OK, I am sorry for the discussion bellow, however, the correct answer to my question is there: https://stackoverflow.com/a/18007165/1699328 2.

As states there, you Right click the file, select 'Properties' --> select 'Configuration Properties' --> select 'General' --> choose 'Yes' from drop down menu for option 'Excluded From Build'

enter image description here

Unfortunately, there are some pitfalls. If you select all files of filter folder, the correct window sometimes is not opened (see bellow)! The same, when you select more files and others than .cpp, .c or .h are selected...

enter image description here

Community
  • 1
  • 1
Dom
  • 532
  • 1
  • 9
  • 23
  • The question is not a duplicate as I want to exclude files from BUILD process, not from Project! – Dom Dec 07 '16 at 16:16
  • Did you read the linked question? It's *exactly* about excluding files from the build. If for some reason the answers there aren't applicable to VS 2015, come back and edit your question - but I suspect it hasn't changed that drastically. – Mark Ransom Dec 07 '16 at 16:18
  • Yes, I did and I tried to apply the answers, files are excluded from build and project - you are not able to "go through the code" anymore via F12. Did you read my question carefully? If not, so, please, read again... – Dom Dec 07 '16 at 16:22
  • Yes, I read your question carefully, you weren't exactly clear on what you were trying to achieve. And if excluding a file from the build also excludes it from Intellisense, there's not much we can do about it. The answers in the linked question clearly identify how to exclude a file from the build without removing it from the project. – Mark Ransom Dec 07 '16 at 16:26
  • Sorry for my "excited" reaction, explanation is above ;-) – Dom Dec 07 '16 at 16:54

0 Answers0