slaks / ref12 Goto Github PK
View Code? Open in Web Editor NEWSends F12 in Visual Studio to the new .Net Reference Source Browser
Home Page: http://visualstudiogallery.msdn.microsoft.com/f89b27c5-7d7b-4059-adde-7ccc709fa86e
Sends F12 in Visual Studio to the new .Net Reference Source Browser
Home Page: http://visualstudiogallery.msdn.microsoft.com/f89b27c5-7d7b-4059-adde-7ccc709fa86e
I can't search this extension on the visual studio 2022 marketplace, will this extension support visual studio 2022? thanks.
Goes to this url, which gives an error message : http://referencesource.microsoft.com/System.Core/a7.html#783a052330e7d48d
I can't use Ref12 behind an authenticating proxy:
18/11/2015 8:58:28 AM: Ref12: Errors occurred while trying all reference URLs; Ref12 will not work
System.Net.Http.HttpRequestException: Response status code does not indicate success: 407 (Proxy Authentication Required).
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SLaks.Ref12.Services.ReferenceSourceProvider.<LookupService>d__9.MoveNext()
When a dll comes with a source indexed pdb, the debugger can step through the source code.
It would be great if F12 could use the pdb to redirect to the source code.
Apparently Ref12 steals Edit.GotoDefinition, so that even if I wanted I can't get back the behavior of going to .NET Framework metadata-built class skeletons. I'd like to see Ref12 implement a bindable command instead so that I could bind the original (built-in) definition of Edit.GotoDefinition and Ref12 to different keys and use them as I wish.
Happens when in a long method you want to jump to the declaration of a local variable.
I'm not sure if this is something on my machine related to other plugins/Chrome extensions, but I would like to point it out here since I have this consistently.
When I press F12 on any valid symbol the browser (Chrome 34) will load the right file, but won't jump to the right line. The URL ends up being something like: http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#df6b1eba7461813b
The issue seems to be related to the loading of the left side menu.
When I manually enter the corect URL in IE (http://referencesource.microsoft.com/mscorlib/system/datetime.cs.html#df6b1eba7461813b) it loads up the page, loads the left side menu, and highlight the correct part.
In Chrome it doesn't load the left side menu (at all for me really), but instead seems to do a navigation/redirect which prepends the base URL again.
I basically have 2 questions here:
Source like string.Join(null, null);
, point at Join then F12, it will jump to http://referencesource.microsoft.com/mscorlib/a.html#0b5f403825f112e6 and only shows:
Don't use this page directly, pass #symbolId to get redirected.
Quickly jumping to the simple class overview like F12 does by default right there inside VS is seriously useful and way more often needed than browsing and digesting the entire source for that class.
Could you please consider changing the hotkey, or at the very least allow me to change the hotkey?
Is there anyway to have this and be able to use F12
to jump from css
class use in html
file to it's declaration?
ex:
<div class="foo"></div>
I should still be able to jump to the file that defines .foo
I get the following exception when starting up Visual Studio:
08.01.2021 16:40:11: Ref12: Errors occurred while trying all reference URLs; Ref12 will not work
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'roslynsourceindex.azurewebsites.net'
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SLaks.Ref12.Services.ReferenceSourceProvider.<LookupService>d__9.MoveNext()
08.01.2021 16:40:12: Ref12: Using reference source from https://referencesource.microsoft.com with 114 assemblies
I am using Microsoft Visual Studio Community 2019, Version 16.8.3, with a .NET Core project.
Visual Studio 2015 Update 1, Ref12 4.2.1. Getting error in output window:
Ref12: Errors occurred while trying all reference URLs; Ref12 will not work
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.Remove(Int32 startIndex)
at SLaks.Ref12.Services.ReferenceSourceProvider.<>c.<LookupService>b__9_1(String s)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at SLaks.Ref12.Services.ReferenceSourceProvider.<LookupService>d__9.MoveNext()
Repro:
In any file add:
using System.Globalization;
If you press F12 on Globalization
, it redirects to: http://referencesource.microsoft.com/mscorlib/a.html#7099ea39e44d5ca6
I think this occurs when a namespace is encapsulated entirely within a single assembly. http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis/Symbols/ISymbol.cs,68be6d663a53115a
Hi,
Thanks for the cool extension. I believe there is an issue when you F12 into a symbol that is in an external library that is not a Microsoft one. If you F12 on the symbol, it will show the [from metadata] tab with the contents of the class. If you press F12 on any external library symbol in the [metadata] tab it will show the error "Can't find C# project for given DTE project" instead of going into the next symbol. Doing the same without ref12 installed produces the correct behaviour.
Hope that makes sense.
Edit: This seems to be an issue in VS2012, not VS2013.
I can see only metadata after clicking "Go To Definition" or "Go To Definition - Native". See the video attached (can be played in a Microsoft Explorer).
2020-04-02_2347.zip
What is Ref12 doing when it spews this message to the General Output tab 3 times in a row every 3 to 5 minutes even when VS2012 is sitting completely idle?
4/2/2014 1:36:27 PM: Ref12: Using reference source from http://referencesource.microsoft.com with 115 assemblies
Right now when I git clone and try to MSBuild, it fails because NuGets are missing. You should enable automatic package restore so that MSBuild would pull NuGets on build.
When I install this in VS2015 and hit F12, I get:
Method not found: 'Microsoft.CodeAnalysis.Document Microsoft.CodeAnalysis.Text.Extensions.GetOpenDocumentInCurrentContextWithChanges(Microsoft.VisualStudio.Text.ITextSnapshot)'.
If others have the same issue: After upgrading my dev machine to windows 10, Ref12 stopped redirecting properly, and instead got stuck on http://referencesource.microsoft.com/mscorlib/a.html
(notice the lack of #md5hash
in the url) with title Redirecting...
and body Don't use this page directly, pass #symbolId to get redirected.
I found out that this is a known bug with Chrome and Windows 10, where an URL started from the shell (or with Process.Start(..)
as Ref12 is doing) will lose everything after the hash sign.
See http://stackoverflow.com/a/32205978 which references two Chrome bugs:
To verify if you have this problem:
http://referencesource.microsoft.com/mscorlib/a.html#8281103e6f23cb5c
, and you should end up on the correct pagestart http://referencesource.microsoft.com/mscorlib/a.html#8281103e6f23cb5c
in a command prompt (or Win-R and paste only the url). Chrome should open a new tab with only http://referencesource.microsoft.com/mscorlib/a.html
and the above error message.I'm not exactly sure if there is anything that can be done from the Ref12 side, and I guess we can only wait for the fixes to land in the public version of Chrome (or change your default browser).
Ref12 suddenly stopped working in combination with Microsoft Edge browser. I'm getting this error message: 'Don't use this page directly, pass #symbolId to get redirected.'
I'm using VS 2017 Community Edition (26403.7) and Windows 10 Pro (15063.250).
Visual Studio 2015 Update 1, Ref12 4.3.
does not work with UWP apps.
I would like to keep F12 it's original function and show the source by context menu only. Bacause it takes some time to load external source and it's not always reliable. (E.g. System.Delegate opens Roslyn source http://source.roslyn.codeplex.com/mscorlib/R/#0dd8585ba1833ad7.html but it's empty page)
I'm using VS2015 and created a Core 1.0 web application, I installed this from MSDN https://visualstudiogallery.msdn.microsoft.com/f89b27c5-7d7b-4059-adde-7ccc709fa86e
site. Still after pressing F12 I can see only the skeleton of implementation. Does this package doesn't work for latest versions of framework ?
As per title. If I disable Ref12 and restart VS2012, F12 keyboard navigation works correctly again.
Using VS2012 Premium with Update 4 applied, Framework 4.5.2.
I have a project with a reference to a library. When using F12/"Go To Definition" on an interface from this library nothing happens.
Using F12 on Types inside this project or on .Net Types works perfectly.
http://www.symbolsource.org/Public is a public reference provider for open source software.
It would be great if the extension could look up the source in it, if it fails to find it on the Microsoft reference source server.
Could we get support for netstandard? F12 on a clr type in a project that's using netstandard brings you to the metadata information.
[EDIT: I did find item https://github.com//issues/7 from 2014 which talks about the same behaviour but I have disabled AdBlock, per the suggestion there, and still experience the same behaviour.]
------ Original post ------
I'm currently in Windows 10 using Chrome (latest) 49.
Microsoft Windows [Version 10.0.10586]
Version 49.0.2623.75 beta-m (64-bit)
Google Chrome is up to date.
I have Ref12 4.2.1, installed 2015-10-27, and I have this extension set to Automatically update.
I've glanced over the list of 4 Open and 19 Closed issues and don't see anything like this.
For some months now I've been finding that Ref12 no longer (for me) navigates to the in-page anchors. It only ever drops me at the top of the reference source page (which can sometimes be hundreds or thousands of lines long.)
So, for example, in an ASP.NET UserControl of mine if I F12 on 'this.Session' I expect to be taken to the declaration of the Session property within UserControl.cs. It does take me to UserControl.cs (this alone is such a beautiful thing), however, it doesn't leave me at the in-page anchor for the Session property declaration. The URL that is first launched is:
http://referencesource.microsoft.com/System.Web/a.html#d45c76a5f73670ef
And when that's done redirecting the URL at which I'm deposited is:
With a bit of fiddling with that last URL I can see that if I take everything after the hashtag and change the comma to a hashtag, I get the right anchored URL and it takes me to the declaration I was expecting.
http://referencesource.microsoft.com/System.Web/UI/UserControl.cs.html#d45c76a5f73670ef
It seems possible (or even likely) this is an issue with http://referencesource.microsoft.com, and not with Ref12. Is it possible for Ref12 to navigate to the correct URL to start with?
Many thanks. Even in its current top-of-page-only form Ref12 is much more useful than [From metadata].
I tried to install this extension in VS2013 Pro, but I get an error message saying "This extension is not installable on any currently installed products." The install log shows:
1/4/2017 9:04:56 PM - Microsoft VSIX Installer
1/4/2017 9:04:56 PM - -------------------------------------------
1/4/2017 9:04:56 PM - Initializing Install...
1/4/2017 9:04:56 PM - Extension Details...
1/4/2017 9:04:56 PM - Identifier : SLaks-Ref12-086C4CE4-7061-4B1F-BC77-B64E4ED71B8E
1/4/2017 9:04:56 PM - Name : Ref12
1/4/2017 9:04:56 PM - Author : SLaks
1/4/2017 9:04:56 PM - Version : 4.4
1/4/2017 9:04:56 PM - Description : Forwards F12 to ReferenceSource.Microsoft.com instead of showing metadata.
1/4/2017 9:04:56 PM - Locale : en-US
1/4/2017 9:04:56 PM - MoreInfoURL : https://github.com/SLaks/Ref12
1/4/2017 9:04:56 PM - InstalledByMSI : False
1/4/2017 9:04:56 PM - SupportedFrameworkVersionRange : [4.5,)
1/4/2017 9:04:56 PM -
1/4/2017 9:04:56 PM - Supported Products :
1/4/2017 9:04:56 PM - Microsoft.VisualStudio.Community
1/4/2017 9:04:56 PM - Version : [12.0,16.0)
1/4/2017 9:04:56 PM - Microsoft.VisualStudio.Enterprise
1/4/2017 9:04:56 PM - Version : [12.0,16.0)
1/4/2017 9:04:56 PM -
1/4/2017 9:04:56 PM - References :
1/4/2017 9:04:56 PM -
1/4/2017 9:04:56 PM - Searching for applicable products...
1/4/2017 9:04:58 PM - Found installed product - Microsoft Visual Studio Professional 2013
1/4/2017 9:04:58 PM - Found installed product - Microsoft Visual Studio 2013 Shell (Integrated)
1/4/2017 9:04:58 PM - Found installed product - Global Location
1/4/2017 9:04:58 PM - Found installed product - ssms
1/4/2017 9:04:58 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Manually opening the vsix file in a zip file manager and adding an
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
line to extension.vsixmanifest, it installs fine and works well.
Looking at https://msdn.microsoft.com/en-us/library/hh696828.aspx, I would expect the extension to also fail to install on the Premium and Ultimate editions, even though it could work on those just as well, but I cannot verify that.
Can the other editions be added to the source.extension.vsixmanifest file?
Hello,
I have a problem with a proxy which requires authentication. HttpClientHander.UseDefaultCredentials doesn't set the credentials to the proxy but only to the request. It seems that Proxy has to be explicitly set if authentication is required. If Proxy is set to null and UseProxy to true (which is default) the default proxy with no credentials is used. The following code work for me:
handler.Proxy = WebRequest.GetSystemWebProxy();
if (handler.Proxy != null)
{
handler.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
}
It would be nice if this could be implemented in any way.
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?
Seems in the code, it will try http://index/assemblies.txt first as the source provider. However, though I can access http://index/assemblies.txt, I do not have access to http://index/, which cause all the F12 failed. Could you make it using http://referencesource.microsoft.com as default?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.