Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Visual Assist causes Build menu item be incorrect
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

afedechko
New Member

7 Posts

Posted - Dec 11 2021 :  04:37:50 AM  Show Profile  Reply with Quote
Hello,
My Visual Studio "Build" menu item is incorrect when Visual Assist Extension is Enabled.

I have a CMake based project, when it is opened with Visual Studio, the Cmake properly generates the project (No error in the console).
However, I'm not able to neither build, rebuild or install the project as my Build menu doesn't list those options (shortcuts F7, Ctrl+Alt+F7 also don't work). That has happened unexpectedly, everything was working as expected and at some point I had to restart the studio and since than the problem appeared.

However, once I disable the Extension within Visual Studio everything starts working. The Build menu lists all necessary items and I'm able to build the project.



I have tried re-cloning the branch, obviously restarting studio/pc, neither of those helped.

I'm not sure what causes the problem, I don't have exact steps to reproduce, however such situation makes usage of the extension impossible.

Edited by - afedechko on Dec 11 2021 09:31:39 AM

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Dec 14 2021 :  10:01:38 AM  Show Profile  Reply with Quote
Apologies for this problem. Can you please look in the folder where your top level "CMakeLists.txt" file lives and see if this folder also contains a folder called:

CMakePresets.json

If so, can you try closing the IDE, renaming this file to hide it from being seen, and see if this has any effect on the Build menu when you reload the IDE? If removing the file "fixes" the problem, possibly breaking the build in the process, then this is a known bug that we believe we have a fix for internally:

case=146429

If you don't have this file, or removing it doesn't help, then we are seeing a different problem.

zen is the art of being at one with the two'ness
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Dec 15 2021 :  04:25:03 AM  Show Profile  Reply with Quote
Thank you for the reply.

I have tried the suggestion, but It didn't solve the problem. The menu it still in not valid state. However, I think that it should be in that state in current situation as the presets file contains settings to generate the Project. If there are no settings nothing will be generated that means that nothing can be built.

Here is the strange thing though.
I cloned the other branch, and on that branch everything works. But it doesn't work with the initial branch, even with re-cloning. Here is an example:
I have next branches: branch_1 and branch_2
I cloned branch_1, at some point in time on that branch I started to see the issue with build menu. I tried to re-clone branch (removed everything from my pc, even placed it into different directory) it didn't help. However, when cloned completely different branch - branch_2 on that branch everything works fine.

Maybe this is something related to some caching on your extension, how could it differentiate between branches.

Thanks

Edited by - afedechko on Dec 15 2021 04:25:59 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Dec 15 2021 :  07:14:53 AM  Show Profile  Reply with Quote
VA does remember information, so it doesn't have to parse everything all of the time, so something being cached is certainly possible. VA uses its symbol database for this, and a minor complication is that we have one instance of the symbol database for each instance of the IDE that you open.

So can you please make sure that you have closed all instances of the IDE, just to avoid any confusion, and then load the IDE, no need to load a solution, and go into VA options and press the button:

VA Options -> Performance -> Rebuild symbol databases

this requires an IDE restart to take effect. So if you close the IDE and then load branch_1, where you are seeing the problem, do you still see the problem? Or does this fix it?

Assuming you still see the problem, what happens if you take just the root folder files for branch_1, basically just the CMakeLists.txt and a couple of code files, just so there is something for the IDE to open. Is the build menu working correctly in this case, with VA installed and enabled?

I am trying to find out if this is similar to the known problem, where some combinations of CMakeLists.txt and CMakePresets.json cause this problem, or if something else seems to be going on here.

zen is the art of being at one with the two'ness
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Dec 16 2021 :  05:33:13 AM  Show Profile  Reply with Quote
hello,

Have tried your suggestions:
Rebuild symbols didn't work

regarding your second approach, here is what I've done:

initial folder:


after removal:


and it didn't help.
again - I can't remove everything but CMakeLists.txt as at that point the project won't be generated by CMake, so there will be nothing to build

The same is true when the extension is disabled. In case I rename the CMakePresets file, and try to open the project, it won't be generated, so there won't be build options available.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Dec 16 2021 :  08:35:25 AM  Show Profile  Reply with Quote
You are using a CMakePresets.json file, which clearly you need. This is probably fixed by our bug fix, which should be in our next version.

For now, are there any comment lines in your CMakePresets.json file? If so can you please try deleting them and see if this helps? Part of the bug is that VA is picking up some comments lines in CMakePresets.json files and trying to make sense of them. But this isn't the only aspect, so I don't know if this will be enough to help you or not.

zen is the art of being at one with the two'ness
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Dec 17 2021 :  01:47:22 AM  Show Profile  Reply with Quote
there are no comments in the presets file
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Dec 17 2021 :  07:31:37 AM  Show Profile  Reply with Quote
We believe we have a fix for this, ready to be in our next release. Until then, unless you can try editing your CMakePresets.json to see if any edits help, the "best" solution if you want to edit with VA enabled, is to run two instances of the IDE. One for editing, with VA enabled and working normally, and one without VA, to allow you to build normally.

Not ideal, sadly, but I am not sure what else to suggest at the moment. If you want to try this, then run the command:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

this will create and load a new, default profile for Visual Studio, so you will be asked which basic settings you want to use, and you should only have the standard, default IDE extensions installed. Visual Assist will not be installed into this profile, so there should be no CMake project building problems.

To load your normal, default profile just load the IDE normally. To return to this test profile again, pass the /RootSuffix command line switch when loading the IDE. You can run both profiles at the same time, next to each other. In VS2019 and VS2022 the profile name will be shown just under the close button, in the top right hand corner of the main IDE window. If you export your IDE settings from your main profile you can them import them into the test profile.

zen is the art of being at one with the two'ness
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Dec 18 2021 :  10:22:34 AM  Show Profile  Reply with Quote
thank you for the help.
will then wait for latest update.
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Jan 14 2022 :  08:27:02 AM  Show Profile  Reply with Quote
Hello,

can you please be more precise on when (on which build) the fix will be provided ?
I have updated to the latest version (at least to that version I was pointed by clicking Update) and still see same problem.

Here is my "about" info:

Visual Assist build 2021.5

License: Standard (...) Support ends 2022.09.08
VA_X.dll file version 10.9.2440.0 built 2021.11.17
DevEnv.exe version 16.11.31911.196 Enterprise
msenv.dll version 16.0.31829.152
Comctl32.dll version 6.10.18362.1440
Windows 10 10.0 1909 Build 18363.1440
8 processors (x86-64, WOW64)
Language info: 1251, 0x422

Thanks.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Jan 14 2022 :  08:50:14 AM  Show Profile  Reply with Quote
We have a fix internally, so this should be in the next release. I have asked if we have an estimated release date yet.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18721 Posts

Posted - Jan 14 2022 :  4:20:51 PM  Show Profile  Reply with Quote
Unfortunately we don't have a firm release date planned, but we are working on getting the next release ready and solid.

zen is the art of being at one with the two'ness
Go to Top of Page

afedechko
New Member

7 Posts

Posted - Jan 18 2022 :  06:29:23 AM  Show Profile  Reply with Quote
thank you
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000