Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 [Bug Report] VA Snippets macro "$PROJECT_NAME$"

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
BeigeAlert Posted - Jul 21 2018 : 3:14:12 PM
Hi,

I have a macro setup to "///" that'll automatically generate the preamble for the top of my files, and I noticed today that the "$PROJECT_NAME$" macro results in nothing until I close and re-open the solution after creating a new class. The $SOLUTION_NAME$ macro works fine though.

Repro Steps:
- Create a new class using the Add -> Class... option in the Solution Explorer.
- (not sure if this matters or not, but I add a "src/" previx to the header and source file names so that it doesn't just dump them into the project root).
- Attempt to use a VA Snippet that uses the $PROJECT_NAME$ macro in either of the 2 new files.
- Notice the project name is left blank.
- Save everything, close the solution, then open the solution again.
- Delete the snippet and try again. Now it works.
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 31 2018 : 06:06:47 AM
Thank you for the update, yes, there was a problem with VA seeing changes to the solution in earlier versions of VS2017, which we had a work around for, but the best solution is to update the IDE, which you have now done.
BeigeAlert Posted - Jul 30 2018 : 8:01:45 PM
Oh dear, yes that could very well be the issue: I'm running 15.1. I'm going to update now, and see if that fixes the issue.

EDIT: Yup, that did the trick! Thanks for your help.
feline Posted - Jul 27 2018 : 2:30:50 PM
Can you please look in the dialog:

IDE Help menu -> About Microsoft Visual Studio

which version of VS 2017 are you running? I am currently running 15.7.5 here, which is the version I have tested this on. It is almost as if VA is not seeing changes to the solution, which has been known in earlier versions of VS2017, so I am wondering if that could be a factor here.
BeigeAlert Posted - Jul 27 2018 : 1:23:07 PM
I just noticed when using VA's "Find References" function on a recently created class that it was only displaying results from the header and source file of that class. Then I enabled "Display references from all projects", and suddenly the results I was expecting popped up, and I notice that the header and source files don't have any project associated with them in the search box (eg all other files are in an expandable group for their respective project).

I will try your steps now to see if it happens with a fresh project.

EDIT: Okay even on a blank project, it still exhibits the same behavior (project name is blank until I reopen solution).

The only other plugins I have for VS is the "QT VS Tools" plugin.
feline Posted - Jul 24 2018 : 1:36:23 PM
I have tried this in VS2017, and still no sign of the problem here.

Can you please open VS2017, then make a new, default C++ MFC project in the IDE, and see if you can reproduce the problem in this solution? I am wondering if there is something about your main solution that is a factor, as if VA is not picking up the change to the project structure correctly.
BeigeAlert Posted - Jul 24 2018 : 11:43:01 AM
I am using VS2017 and the latest visual assist (downloaded and tested moments before making the OP... not sure what number that is).
feline Posted - Jul 23 2018 : 05:19:23 AM
Which IDE and version of VA are you using?

So far I cannot reproduce this problem here, I am testing using VS2015 and VA 2283.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000