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
 VAX doesn't play well with solution folders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Sep 01 2019 :  09:20:29 AM  Show Profile  Reply with Quote
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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 02 2019 :  11:39:16 AM  Show Profile  Reply with Quote
I am seeing a very similar problem here, I am just running tests to find out where this works and where this fails.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 02 2019 :  12:11:16 PM  Show Profile  Reply with Quote
Are you using a C# .NET Core solution, or a different type of C# project? The C# project type appears to be a factor here.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Sep 02 2019 :  1:30:20 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Sep 02 2019 :  3:52:54 PM  Show Profile  Reply with Quote
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.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 05 2020 :  08:08:11 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 06 2020 :  2:31:54 PM  Show Profile  Reply with Quote
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?

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 07 2020 :  11:36:58 AM  Show Profile  Reply with Quote
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.

Edited by - Mnemonic on Jan 07 2020 11:38:06 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 07 2020 :  2:32:30 PM  Show Profile  Reply with Quote
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

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 09 2020 :  11:42:15 AM  Show Profile  Reply with Quote
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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 10 2020 :  3:14:28 PM  Show Profile  Reply with Quote
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: support@wholetomato.com

including this thread ID or URL in the description, so we can match it up.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 11 2020 :  08:52:12 AM  Show Profile  Reply with Quote
I have a sample project now, so now trying to reproduce these problems to study them.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 14 2020 :  05:20:49 AM  Show Profile  Reply with Quote
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.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 14 2020 :  07:18:33 AM  Show Profile  Reply with Quote
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:

support@wholetomato.com

including this thread ID or URL in the description, so we can match it up.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 14 2020 :  12:38:25 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 14 2020 :  1:42:39 PM  Show Profile  Reply with Quote
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?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 17 2020 :  1:41:20 PM  Show Profile  Reply with Quote
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.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 18 2020 :  03:29:34 AM  Show Profile  Reply with Quote
Hmm, interesting. Glad you were able to repro this!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 21 2020 :  07:30:58 AM  Show Profile  Reply with Quote
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.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 21 2020 :  11:46:49 AM  Show Profile  Reply with Quote
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.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 22 2020 :  04:37:57 AM  Show Profile  Reply with Quote
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.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 22 2020 :  12:39:46 PM  Show Profile  Reply with Quote
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.

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

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 24 2020 :  07:02:51 AM  Show Profile  Reply with Quote
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.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - Jan 26 2020 :  08:11:54 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - Jan 27 2020 :  05:43:40 AM  Show Profile  Reply with Quote
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.

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - May 25 2020 :  02:03:37 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - May 25 2020 :  07:52:57 AM  Show Profile  Reply with Quote
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?

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

Mnemonic
Senior Member

Czech Republic
33 Posts

Posted - May 26 2020 :  01:32:02 AM  Show Profile  Reply with Quote
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)

Edited by - Mnemonic on May 26 2020 01:34:33 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17027 Posts

Posted - May 26 2020 :  09:46:45 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000