Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX doesn't play well with solution folders

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
Mnemonic Posted - Sep 01 2019 : 09:20:29 AM
1) C# project
2) Create a new class
3) Create solution folder and move the class to the new folder
4) VAX still references the old file location
5) Delete the folder. VAX *still* references the deleted file

One has to rebuild symbols and restart IDE.

Video: http://dead-code.org/misc/vax_folders.mp4

VAX: 2341.2
VS: 16.2.3
30   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 24 2021 : 11:58:05 AM
How are you renaming the files? Using VS2019 I have just placed focus into the Solution Explorer tool window, selected a file, pressed F2 and renamed the file in solution explorer.

VA is showing the new name instantly in VA's Open File dialog.

So I assume you are doing something else, but what?
Mnemonic Posted - Aug 24 2021 : 02:09:21 AM
I mean, renaming a file doesn't reflect in VAX. Recently I did some massive refactoring which involved renaming a lot of classes and it was PAIN.
feline Posted - Aug 23 2021 : 08:31:14 AM
Which bug in particular are you talking about?

The one from the first post in this thread is still open, unfortunately. We have looked at this, but it isn't as easy to fix as we would like, since the IDE does not seem to expose the information about files being moved from one folder to another with drag and drop in solution explorer.

Also lately a lot of our focus has been on VS2022 support. I appreciate none of this makes the situation any easier or less annoying for you, but we have not forgotten about this bug report, and it is still a bug we would like to get fixed.
Mnemonic Posted - Aug 22 2021 : 08:36:43 AM
Years go by, and this bug still annoys me to no end...
feline Posted - May 26 2020 : 09:46:45 AM
Ah, OK, a different bug than the one I was thinking about, when looking over this thread. This is still a known bug. We have done some work on this, but don't yet have a full solution. It's not quite as easy to fix as it looks like it should be, various edge cases we have to watch out for:

case=141188

We are hoping to have a full fix fairly soon, but unfortunately I don't currently have an estimate for when this might be.
Mnemonic Posted - May 26 2020 : 01:32:02 AM
I'm still seeing the problem with moving file to another solution folder (by using drag and drop in VS). The Open File dialog still lists the original file location (hence fails to open it).
After your suggestion I enabled the "Include all files..." option, and the result is, that I see the moved file twice. Both the original location (which cannot be open) and the new location. Better than nothing, but still a serious bug, IMO.

(VAX 2375, VS 16.6.0)
feline Posted - May 25 2020 : 07:52:57 AM
It looks like we overlooked updating this thread, but one of the two problems I confirmed, case=141794, which is newly added files not being listed in the Open File dialog until you do a VA symbol database rebuild has been fixed.

We are still looking into the second bug, which is case=141795, VA not parsing the .net core namespaces after triggering a symbol database rebuild. Is this the problem you are still seeing?
Mnemonic Posted - May 25 2020 : 02:03:37 AM
Hello, any progress on this? This bug still exists in the latest build and it's still extremely annoying.

Regarding the wrong coloring, I found that switching build configuration from Debug to Release actually seems to prompt VA to re-import assemblies.
feline Posted - Jan 27 2020 : 05:43:40 AM
Ah, apologies for the confusion, I actually mean the "Target" block, which was:

<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Unclassified.NetRevisionTask.0.3.0\build\Unclassified.NetRevisionTask.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Unclassified.NetRevisionTask.0.3.0\build\Unclassified.NetRevisionTask.props'))" />
<Error Condition="!Exists('..\packages\Unclassified.NetRevisionTask.0.3.0\build\Unclassified.NetRevisionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Unclassified.NetRevisionTask.0.3.0\build\Unclassified.NetRevisionTask.targets'))" />
</Target>

so nothing to do with the TargetFramework or PlatformTarget blocks.
Mnemonic Posted - Jan 26 2020 : 08:11:54 AM
quote:
Originally posted by feline
Open File in Solution dialog -> Right Click -> Include all files in solution directories

while in the OFIS dialog. Not ideal, but since VA will show all files, this will cause the newly added file to show up without requiring a symbol database rebuild.


Thank you! That's a good workaround, it will make my life easier.

quote:
Originally posted by feline
For both of these the <Target> </Target> block in the CSPROJ file seems to be the trigger, in case knowing this helps you at all.


Which "Target" tag do you mean specifically? There's either TargetFramework or PlatformTarget.

quote:
Originally posted by feline
Is your project actually being built from inside Visual Studio, via the IDE Build menu?


Yes, the project builds from VS without any problem.
feline Posted - Jan 24 2020 : 07:02:51 AM
Sorry this took to long. I have put in two bug reports, for two separate aspects of this problem. Firstly, VA not parsing the .NET namespaces when you load this solution after triggering a VA Symbol Database rebuild:

case=141795

and also VA not picking up new classes / files until you have done a VA Symbol Database rebuild:

case=141794

Here, a partial work around is to use CTRL-D to toggle

Open File in Solution dialog -> Right Click -> Include all files in solution directories

while in the OFIS dialog. Not ideal, but since VA will show all files, this will cause the newly added file to show up without requiring a symbol database rebuild.

For both of these the <Target> </Target> block in the CSPROJ file seems to be the trigger, in case knowing this helps you at all.

However, even with all of this, the only time I can reproduce the problem where "Generic" only on the:

using System.Collections.Generic;

line is not coloured correctly is when I have missing dependencies in Solution Explorer, and my test C# project won't compile. Is your project actually being built from inside Visual Studio, via the IDE Build menu?

I feel that I am still missing something in all of this.
feline Posted - Jan 22 2020 : 12:39:46 PM
Ahha! Finally!

I have finally managed to reproduce the problem where you need to do a VA symbol database rebuild before a newly added class / file is shown in VA's Open File dialog! Now I just want to get this to a minimum example.
feline Posted - Jan 22 2020 : 04:37:57 AM
Thank you for the update. I have managed to reproduce VA not seeming to do the scan on loading a project as well. I am just trying to tease the different effects apart here, to pin down what the specific problems are.
Mnemonic Posted - Jan 21 2020 : 11:46:49 AM
No, doesn't seem to be the case:



I really do think the rebuild doesn't properly scan all .NET assemblies on startup, as it should. On a working project, when I force rebuild, I see the "VA: Importing ...." messages after VS restart. On my problematic project I don't see those.

feline Posted - Jan 21 2020 : 07:30:58 AM
In your solution where you have the namespace colouring problem, can you please look in VA's Find Symbol dialog, Alt-Shift-S, and filter the dialog for:

.generic.

so a dot before and after "generic", and see if anything is listed as part of your solution? Under some conditions VA will colour a namespace item as a function or accessor. But not always it seems. So I am wondering if this is happening for you, or if this is a separate problem that looks the same.
Mnemonic Posted - Jan 18 2020 : 03:29:34 AM
Hmm, interesting. Glad you were able to repro this!
feline Posted - Jan 17 2020 : 1:41:20 PM
I have managed to reproduce the problem here, using your project, thank you for that. I am seeing the colouring problem on a using line, but with a different namespace. Interestingly, the problem depends both on the project file and the source code you have in the directory tree.

So I am currently narrowing down the trigger, to see what is required to produce this problem.
Mnemonic Posted - Jan 14 2020 : 1:42:39 PM
I'm not able to reproduce the issue on a new project :( Even if I add various "non-standard" pieces from the problematic csproj.

I noticed one thing, though. On my test project, if I use the "Rebuild" command, after restarting Visual Studio, I can see VA rebuild progress in the status line, "VA: Importing ....", as it scans various .NET assemblies.

But, if I use "Rebuild" on the problematic project, I don't see this at all. So it seems to me VA doesn't actually scan the system assemblies for some reason. Is there any way to enable logging for the rebuild process?
Mnemonic Posted - Jan 14 2020 : 12:38:25 PM
Thank you for looking into this.

I'm using the latest version of VA and VS2019.

VA: 10.9.2358.0
VS: 16.4.2

Open Solution File dialog says there are 710 files.
The newly added class file is only missing from the VA Open Solution File dialog. As far as I can tell, VA is otherwise aware of the new class (VA Find Symbol DOES list the class).

I've sent you one of the project files.
I'll see if I'm able to create some minimal repro solution.
feline Posted - Jan 14 2020 : 07:18:33 AM
Which version of VA are you currently using? Some fixes have been made in the last couple of versions to help improve support and handling of .NET Core projects. Support for these SDK projects is being done in:

case=98052

Would it be possible for you to send me a copy of the .CSPROJ file you are using? I am wondering if you are doing something a bit more complex in this file, and this is the trigger? Since this file should not hold any source code I am wondering if it is something you would be able to send me safely. Please send me the files via email:

[email protected]

including this thread ID or URL in the description, so we can match it up.
feline Posted - Jan 14 2020 : 05:20:49 AM
I am seeing some of these problems here, but not all of them.

How large is your solution? How many files do you have in your solution?

If you open VA's Open File in Solution dialog (Alt-Shift-O) the title bar contains two numbers. The first number is the number of files currently listed, which changes as you filter the list. The second number is the total number of files in the list, which is normally the number of files in your solution. What is this second number?

When you say you are not seeing the new class, where are you looking for it? VA's Open File dialog, or VA's Find Symbol dialog, or somewhere else?

I have the new class showing up in the Find Symbol dialog, but not the Open File dialog, but this only requires an IDE restart to fix, not a symbol database rebuild. Also, so far, I cannot reproduce the colouring problem on the using line. So I am getting closer, but I am still not seeing everything you are.
feline Posted - Jan 11 2020 : 08:52:12 AM
I have a sample project now, so now trying to reproduce these problems to study them.
feline Posted - Jan 10 2020 : 3:14:28 PM
I am in the process of reading up on this type of project, and working out how to make a test project here. Do you happen to have a simple test project of this SDK type that you could send me for testing purposes?

If so, could you please email me at: [email protected]

including this thread ID or URL in the description, so we can match it up.
Mnemonic Posted - Jan 09 2020 : 11:42:15 AM
Yes, I mean the "using XXX;" lines. They display like this:



"Enumerate project references thoroughly" was enabled. I tried turning it off, but there's no apparent difference. After rebuild, namespaces still display like on the above screenshot.

By SDK style project I mean the new .csproj file format introduced with .NET Core (but can be used for any .NET project in VS2019).
The main difference is that the new format doesn't explicitly list all .cs source files, but uses default wildmarks to automatically include all files in the project folder.

The format is documented here: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj
feline Posted - Jan 07 2020 : 2:32:30 PM
The problems I was able to reproduce did not require a VA symbol database rebuild to fix, so it sounds like there is something more going on here.

First the colouring of the namespace, is this on the using line at the top of your code files:

using System.Collections.Generic;

or somewhere else in the file? This using line is coloured correctly for me on a VA symbol database rebuild here. Do you have:

VA Options -> Projects and Files -> Enumerate project references thoroughly

turned On or Off? If Off does turning this setting On make any difference?

Can you explain what you mean by a SDK-style project? I don't see any obvious options for making a new solution of this type, or a component in the Visual Studio installer that would enable it. A google got me to this page, is this talking about the same thing you are doing?

https://docs.microsoft.com/en-us/visualstudio/extensibility/walkthrough-creating-an-sdk-using-csharp-or-visual-basic?view=vs-2019
Mnemonic Posted - Jan 07 2020 : 11:36:58 AM
Nope, not even restarting VS. I need to explicitly request Rebuild symbol database. Only then any newly added .cs files are recognized.

But, after the symbol rebuild, system namespaces (such as System.Collections.Generic) are not colored properly (they're black), I need to press F12 on some class in that namespace and only then VA starts coloring the namespace.

It's an SDK-style csproj project targeting .NET Core 3.1 desktop app.
feline Posted - Jan 06 2020 : 2:31:54 PM
We are still working on a full fix for the problem of moving files in Solution Explorer, and are hoping to have a fix in our next few builds.

When you say any newly added classes, are you moving these classes after adding them to the folder, or are these new classes / files you are simply adding without moving them? I am wondering if you are seeing a separate problem here as well.

Does closing and reloading the folder / solution get VA to pick up the new files / classes?
Mnemonic Posted - Jan 05 2020 : 08:08:11 AM
I'd like to gently bump this issue. It got to a point where VA Open File in Solution window doesn't register ANY newly added classes, which is of course extremely annoying.
feline Posted - Sep 02 2019 : 3:52:54 PM
I have some of the same problems here, enough of them that it looks like I am seeing the same problem, I have put in a bug report for this:

case=141188

I don't get quite the same behaviour, but I have a situation where I do need to do a VA symbol database rebuild before VA will pick up the new file in the solution.

This really should not be happening, apologies for this problem.

I just hope you are not running into this to often in your solution.
Mnemonic Posted - Sep 02 2019 : 1:30:20 PM
The solution on the video was .NET Framework project (default console application template).
But my main project is .NET Core 3 and I'm seeing the same problem.

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