INTELLISENSE NOT WORKING ON MICROSOFT .NET ASSEMBLIES

Hi, I am trying the codeeditor 2.1 on my application (upgrade from qwhale 1.56).
The intellisense doesn't seem to show the description of any Microsoft .NET assemblies.
[My Object].GetType() doesn't show the usual "Gets the Type of the current instance."
Actually even something like: integer.MaxValue() doesn't show the description also.
I tried your code completion demo and it is working fine.
Do you have any idea what could I possibly do wrong that may have caused this issue? Maybe I misconfigured something??
Thanks.
Hi Jojo,
It sounds like documentation provider can't locate xml file with descriptions (if you have source code you might be able to debug RoslynDocumentationProvider.GetDocumentationForSymbol (in case you're using Roslyn parsers).
If you could send us cut-down version of your project, it might help us as well to locate the problem.
regards,
Andrew
You are correct Andrew, for some reason it cannot find the xml documents. I moved the mscorlib.xml to desktop, and suddenly it started to work. But I don't understand why it looks in the desktop folder. Do you know the logic of how the documentation provider is looking for the xml doc files?
You asked me to debug RoslynDocumentationProvider.GetDocumentationForSymbol. I think that's great info, unfortunately I am not using the Roslyn parser. I am using the Advanced.VbParser. Do you know the equivalent DocumentationProvider for this parser that I could debug?
Hi Jojo,
I'm upload modified version of the Alternet.Syntax.Parsers.Advanced.dll with DescriptionHelper.cs:
http://www.alternetsoft.com/projects/AlterNET_02_23_2018.zip
Please try it and let me know whether it works for you.
regards,
Andrew
Andrew, thank you so much for your help. I appreciate it greatly.
I was trying to try your dll, but it seems that it requires the Alternet.Syntax.dll updated version. Here is the error code.
Severity CodeDescription ProjectFile LineSuppression State
ErrorCS1705 Assembly 'Alternet.Syntax.Parsers.Advanced' with identity 'Alternet.Syntax.Parsers.Advanced, Version=2.1.1.21378, Culture=neutral, PublicKeyToken=8032721e70924a63' uses 'Alternet.Syntax, Version=2.1.1.21378, Culture=neutral, PublicKeyToken=8032721e70924a63' which has a higher version than referenced assembly 'Alternet.Syntax' with identity 'Alternet.Syntax, Version=2.1.0.0, Culture=neutral, PublicKeyToken=8032721e70924a63'

Please send me the corresponding Alternet.Syntax.dll and/or other dependencies if you can.

Thanks.
Hi Jojo,
I'm upload Alternet.Common.dll, Alternet.Syntax.dll and Alternet.Syntax.Parsers.Advanced.dll.
Please try them and let me know whether it is works as expected:
http://www.alternetsoft.com/projects/AlterNET_02_26_2018.zip
regards,
Andrew
Andrew, I have tried the dlls, unfortunately it is still behaving the same as before.
The intellisense works only if the xml doc files are in the same folder as where the executable is run.
Let me know if I can try anything else.
Thanks.
Hi Jojo,
Could you please send me a cut-down version of your project, it might help us as well to locate the problem?
regards,
Andrew
mmm I don't quite know how to present you with a meaningful cut-down version of my application.
Maybe if you could direct me which part of my application that you want to look then I can give you a meaningful cut-down version of it.
What I can tell you is that using the old QWhale 1.56 we don't see this problem, but it has problem with not able to display the intellisense description of a base class. That issue has been fixed in Alternet 2.1. But the QWhale 1.56 has no problem finding the xml doc when the application is run in different folder than the location of the xml doc. Alternet 2.1 has that issue. All I am doing is substituting the QWhale references to the corresponding Alternet references.
Hi Jojo,
Please try debugging the following method in DescriptionHelper.cs (which is located here: \Source\Parsers\Advanced\Classes\CodeCompletion)
Please use the latest DescriptionHelper.cs that I've sent you.
public static DescriptionInfo LoadAssembly(Assembly assembly)
{
DescriptionInfo result = (DescriptionInfo)assemblies[assembly];
if (result == null)
{
result = new DescriptionInfo();
if ((assembly.Location != null) && (assembly.Location != string.Empty))
{
try
{
string localeName = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
string fileName = Path.ChangeExtension(Path.GetFileName(assembly.Location), "xml");
FileInfo fileInfo = new FileInfo(fileName);
if (!fileInfo.Exists)
foreach (string path in SystemAssemblyFolders)
{
fileInfo = new FileInfo(path + fileName);
if (fileInfo.Exists)
break;
}
if (fileInfo.Exists)
LoadXmlFile(fileInfo.FullName, result.Descriptions, result.Priorities);
}
catch
{
}
}
}
assemblies[assembly] = result;
return result;
}
I suspect that non of paths defined in SystemAssemblyFolders do not contain mscorlib.xml.
If you're unable to debug it, we might need to setup a remote desktop session to troubleshot the problem.
regards,
Andrew
Andrew, I don't think I have those source code. In fact, I got no source code at all. I have the trial version of Alternet 2.1.
Am I supposed to have access to that source code?
Hi Jojo,
Our developer has contacted you via email to resolve this problem by debugging it remotely.
regards,
Andrew
I observe the same issue here (with 2.1 or 3.0 assemblies and .NET Framework 4.6.1), using the Roslyn parser.
The following analysis was done with the "SnippetParser" sample: I added this code to a public method in the "VBMethodParser" class:
RoslynSolution rosSol = (RoslynSolution)this.RoslynSolution;
string strAssemblyPathAndName = rosSol.ResolveAssemblyName("mscorlib");

Project project = rosSol.Solution.GetProject(rosSol.ProjectId);
MetadataReference metaRef = project.MetadataReferences.FirstOrDefault(meta => meta.Display.ToLower() == strAssemblyPathAndName.ToLower());
PropertyInfo pi = metaRef.GetType().GetProperty("DocumentationProvider", BindingFlags.Instance | BindingFlags.NonPublic);
RoslynDocumentationProvider rosDocProv = (RoslynDocumentationProvider)pi.GetValue(metaRef);

MethodInfo mi = rosDocProv.GetType().GetMethod("LoadDescriptions", BindingFlags.Instance | BindingFlags.NonPublic);
object descInfo = mi.Invoke(rosDocProv, new object[] { CultureInfo.CurrentCulture });
MethodInfo mi2 = descInfo.GetType().GetMethod("LoadDescriptions", BindingFlags.Instance | BindingFlags.NonPublic);
mi2.Invoke(descInfo, null);
The "documentation Provider" properties:
RoslynDocumentationProvider.SystemPath = C:\Windows\Microsoft.NET\Framework\v4.0.30319\
RoslynDocumentationProvider.FullPath = C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll

The "descInfo" variable (Alternet.Syntax.Parsers.Roslyn.CodeCompletion.RoslynDocumentationProvider.DescriptionInfo) has this content:
"SystemPaths":
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\
Property "Descriptions" is empty.
In "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0", there is a mscorlib.xml with this content:


The redirected path contains the full "mscorlib.xml".
Do you have any idea?
I found this Roslyn bug report, which sounds related:
https://github.com/dotnet/roslyn/issues/13529
Best regards
Wolfgang
Hi Wolfgang,
Would it be possible to send us sample demo (or updated SnippetParsers project) where the problem can be reproduced?
regards,
Andrew
Feedback from AlterNET after some emails:
Looks like it finds xml file, however it contains redirect instead of full description. We will look how to support this scenario (provided that xml file with full description exists somewhere on the same machine), I will let you know our findings shortly.
The issue is fixed by the AlterNET guys!
Many thanks
Wolfgang