F12 redirects to source.roslyn.codeplex.com/mscorlib/ instead of referencesource.microsoft.com
Closed this issue · 5 comments
If I press F12 on, say, String.Format(...)
I end up on http://source.roslyn.codeplex.com/mscorlib/R/#c07c3772222caaff.html which displays a blank page (reponse body is empty), while it should probably end up at http://referencesource.microsoft.com/#mscorlib/system/string.cs,691a34e179b91fdb (or equivalent since there are multiple overloads of String.Format).
It looks to me like the RoslynReferenceResourceProvider
accepts symbols from the BCL while it shouldn't, and gets selected before the DotNetReferenceSourceProvider
in
I'm not exactly sure how I can enable or disable the Roslyn provider when the extension is installed?
This is due to the presence of mscorlib in this file: http://source.roslyn.codeplex.com/assemblies.txt (mscorlib;-1;127)
As a quick fix you can swap those classes:
Ref12/Ref12/Services/ReferenceSourceProvider.cs
Lines 19 to 30 in e60081c
DotNetReferenceSourceProvider
to be lookup first in
Yes it seems that only types in mscorlib
are incorrectly redirected to roslyn, while all others are correctly sent to referencesource (like Enumerable.Range
which is not in mscorlib.dll).
Maybe someone mistakenly put mscorlib in the /assemblies.txt on source.roslyn.codeplex.com in the last update... Unfortunately I'm not sure who can be contacted to fix that?
@KirillOsenkov Can you please remove mscorlib from http://source.roslyn.codeplex.com/assemblies.txt?
This wouldn't be the right fix (since mscorlib has to be in that list for various other reasons).
Instead, you can ignore all lines in assemblies.txt which have -1 in their second column:
// Format:
// AssemblyName; ProjectIndex; DependentAssemblies
var assemblies = new HashSet<string>(
assemblyList.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
.Where(s => !s.Contains(";-1;"))
.Select(s => s.Remove(s.IndexOf(';')))
);
This will correctly filter out all assemblies not backed by a project.
I'll release this later tonight.