Author |
Topic  |
|
.oisyn
Tomato Guru
    
174 Posts |
Posted - Oct 14 2025 : 10:06:31 AM
|
I mostly work with conan projects nowadays, and we have some projects that depend on eachother. Usually I just build using the dependencies from the package repository, but sometimes it's required to refer to a local checkout of a dependency.
This workflow doesn't seem very compatible with Visual Assist. Because when issuing a goto definition, it keeps finding the header in the conan package dir (e.g., C:\.conan2\p\foo63c7939e888b8\p\include\Foo\Foo.h), even though F12 (goto definition according to Intellisense) correctly browses to D:\dev\Foo\include\Foo\Foo.h.
I can't seem to shake off the old folder from Visual Assist, save from rebuilding the symbol database, which forces me to close all devenvs.
Isn't there just a "reparse all symbols for current project" option? There is a "Reload solution", but that doesn't help. |
|
feline
Whole Tomato Software
    
United Kingdom
19231 Posts |
Posted - Oct 14 2025 : 10:50:00 AM
|
I have never heard of conan, so if any knowledge of conan is going to help, you will need to give me some pointers as we go along.
Unfortunately no, a full VA symbol database rebuild requires an IDE restart.
When this is happening, is Alt-G taking you directly to the package directory version? Or is it offering both versions of the file? I am trying to work out if we have a "never learns about the D drive version" problem, or "won't ignore the C drive version" problem, or even both at once.
If you want VA to ignore certain directories, this can be done via the setting:
VA Options -> Advanced -> Performance -> Do not parse files excluded by .vscode\settings.json (requires restart)
where the .vscode directory is created in the directory that holds the .SLN file you are opening, or in the root directory you are opening if you are opening a directory tree.
My test exclude file is:
{
"files.exclude": {
"*/cpp_dll_cpp17": true,
"cpp_dll_cpp20" : true,
"**/bugs" : true,
"**/code_formatting_tests/clangFormatBase" : true,
"**/test_plain_text.txt" : true,
"**/*.xaml" : true
}
}
which is excluding 4 directories, and everything under those directories, one file and one file extension. Just watch for the commas at the end of most lines when editing the file. Hopefully what I am doing here is fairly easy to follow. |
zen is the art of being at one with the two'ness |
 |
|
.oisyn
Tomato Guru
    
174 Posts |
Posted - Oct 14 2025 : 5:29:43 PM
|
quote: Originally posted by feline
I have never heard of conan, so if any knowledge of conan is going to help, you will need to give me some pointers as we go along.
Knowledge isn't really needed, Conan's a package manager for C++. I guess it's useful to know that it generates cmake packages (or at least our does, my experience with Conan is fairly new), so I use the "open folder" feature of Visual Studio instead of dealing with .sln files. Visual Studio's intellisense probably gets its include folders from the cmake config.
quote: When this is happening, is Alt-G taking you directly to the package directory version? Or is it offering both versions of the file? I am trying to work out if we have a "never learns about the D drive version" problem, or "won't ignore the C drive version" problem, or even both at once.
It just brought me to the conan package folder. Now, I both tried forcefully opening a header in the right dir and doing a 'reparse current file', AND found a VA setting for include folders that was set to Custom instead of Project in the dropdown at the top.
After doing both these things, the correct header files were indeed also being suggested when doing alt-g, but I'm not sure which if my actions caused for that.
[qoute]If you want VA to ignore certain directories, this can be done via the setting:
VA Options -> Advanced -> Performance -> Do not parse files excluded by .vscode\settings.json (requires restart)[/quote]
Oh I guess I could use that as a workaround, thanks! |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19231 Posts |
Posted - Oct 15 2025 : 07:14:33 AM
|
When you open a folder, as I understand it, you are telling VA and the IDE that you want all of the code files in the folder, and all of its sub-folders, all the way down. So if the C drive version of this header is a child of the folder you are opening, then I would expect VA to be picking it up.
Include directories are a more complex matter, since a "folder" doesn't come with any settings for us to parse. I know CMake can be asked to generate Visual Studio SLN files, but since you have something that is working, that probably isn't going to be of much interest to you.
I half remember a settings file you can try to use to add extra include directories, that VA should pick up, but if you are only working with one project, then VA's custom include directories setting should work well for you. But this is a *global* setting, so won't work so well if you are working on several different projects that require different include directories. |
zen is the art of being at one with the two'ness |
 |
|
|
Topic  |
|
|
|