Excluding directories for a single Visual Studio C++ project - visual-c++

I have a large set of include directories for my solution, and want to exclude one of them for a single project in the solution, how can I do this?

There is no way to exclude an include for a single project in the solution (after conversation with folks at MSDN). The best workaround is to not inherit from solution for that one specific project, and to define its includes at the project level, without the directory that was causing problems.

Related

What is the "include" folder used for in a Katalon Studio project

Similarly to what is being asked in this question, which is yet without answer, I'm struggling to understand how should I properly use folders in a Katalon Studio project.
In particular, so far I wasn't able to trigger creation of any file in the Include subfolders.
Which files should I expect to find there? Depending on the answer, I can decide wether to put them under version control or go and default .gitignore to exclude Include.
I watched the available tutorials, but so far I couldn't grasp it (unless I missed something).
It is pretty un-intuitevly named, but Include folder is used for BDD integration.
Include folder should include two subfolders: one for feature files and the other for step definition files.

Adding two existing projects of the same name but located in different folders

I have 2 projects that are structured somewhat like:
FolderA
|
\--> Project1.vcxproj
FolderB
|
\--> Project1.vcxproj
The two Project1s are actually different projects.
When I right-click on my solution and Add -> Existing Project, I get the following error.
The solution already contains an item named 'Project1'.
Given that I can't rename the actual project files and that I want them both added to the same solution, is there any way I could do it?
I've tried many things:
Renaming the project file in Visual Studio.
Deleting the .suo file and restarting VS.
Editing the .sln/.vcxproj files using a text editor (but there was nothing relevant that I could find).
All of the above resulted in the same error.
I would think that since the project files are in separate folders, VS would treat them as separate projects, but there must be something I'm overlooking.
The problem occurs when you have two project files with the same name (not projects with the same name, but project files). In your case they are Project1.vcxproj and Project1.vcxproj. Therefore, you have to rename one of them (and do not forget to rename the corresponding Project1.vcxproj.filters file) and only after this add this project to the solution as an existent project.
Maybe the problem can be solved somehow else, without renaming the files, but I do not know how.

Android Studio NDK: exclude native files?

I notice that the later versions of gradle have a means to exclude resources, however I have not seen any examples supporting this where we specify .jni.srcDirs, which unselectively includes everything under each .srcDir path.
Does anyone know of a way to specify certain subdirectories to exclude, for NDK?
What about excluding individual files by extension?
My only alternative seems to be to explicitly list files that are used.
P.S. I don't want to use Android.mk; if possible I would prefer to stick with Gradle's automation.
At least for the present, this doesn't seem to be possible through gradle.
What I've done for now is to delete unwanted files (example sources) from the source folders (then had git ignore those deletions so it doesn't try to check in changes to the project's submodule dependencies). This way I can keep the repos the same but still have Android Studio / gradle not process those unwanted files.
Of course, if you cut gradle out of the picture altogether, you can do whatever you like with your makefile, including solving this problem.

Check that no file is forgotten for the installshield project

we actually build an InstallShield project for our application with the functionality to include files dynamic into a component. All files will be taken which are in a specific place.
Because of problems, which are not part of this question, we want to change this to components where we add files explicit to custom separated components.
The question is, is there a best practice for this? We have the small fear that we easily can forget to add files to the component we new created. These can be dll files, .config files, pdfs or just xml.
(We build the installer every night using TFS.)
We found a solution for the problem.
What we wanted to solve:
During the build we want to be informed if files got removed
During the build we want to be informed if new files are missing
we solved this by two more or less easy things.
1. Information if a file is removed
This is easy sone, we have all files added explicitly, each single file is an own component now, if one file is missing the whole project does not build with the exact error message.
2. Information for missing files
For this we wrote a small tool which runs by a prebuild event of the installshield project.
There it opens the *.ism file as an xml file and searches for the "Files" table.
Than it takes all files from the drop folder and looks if all files are in there.
If there are files missing but we don't expect them, like pdb files or test dlls, we have an additional text file we just called "IgnoreList".
The tool skips these files by the check.
Now we are on a very good state to get informed directly on the next morning if the project was able to build or not, and if not what happened, so we can be sure that in the final target application are files are there :-)

Organizing a CMake project so that sources can be easily browsed in Visual C++

(I'm new to CMake and I am not so familiar with Visual Studio.)
I need to implement a relatively big library the solution/project files will be generated by CMake, and my problem is that I would like the organization of the files in VC GUI to reflect the directory structure on the disk.
Basically, the library is split into different parts. For instance one of them is called "common" and will implement some headers used by the library. On the disk it will be in a specific "common" directory, which may have one or more subdirectory.
src/
common/
...
portfolio/
...
asset/
contracts/
physical_assets/
...
mathutils/
...
I'd like to have the see the same thing within Visual Studio's Solution Explorer,
but I only know how to split the solution into different projects.
How can I do that?
You can do that using SOURCE_GROUP, the CMake FAQ covers that.
I don't think you can. If you use "Show All Files" you will get what you want, but only at the project level. Creating a VS project at the root may give you the possiblity of viewing all your files, but you will still need separate projects for each exe/dll/etc. you want to build. Remember that a solution in VS terms is a set of projects, not a directory tree.
Not sure if this is what you're after, but: first make sure you have "Tools->Options->Projects and Solutions->Solution Explorer Mode" set to "Show All Files". Then if you create a VS project in the root source directory (probably the same as where your CMakeLists.txt goes), VS will show all files in that directory and all it's subirectories.

Resources