Git Product home page Git Product logo

ref12's People

Contributors

afnpires avatar kirillosenkov avatar slaks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ref12's Issues

407 authentication errors behind corporate firewall

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()

Support source indexed pdb

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.

Ref12 should implement a command rather than steal Edit.GotoDefinition

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.

F12 will jump to write file, but not the right line (Chrome 34)

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:

  • Does this work correctly for others in Chrome?
  • Would it be possible to add a setting to Ref12 where the user can choose what browser is used?

Change hotkey from F12

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?

F12 for css

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

Ref12 fails to load reference URL

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.

Error when pressing F12

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()

Metadata browser issue

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.

Error in VS2015 RTM

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)'.

Redirection error on Windows 10 with Chrome as default browser

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:

  • In a new tab in chrome, navigate to http://referencesource.microsoft.com/mscorlib/a.html#8281103e6f23cb5c, and you should end up on the correct page
  • run the command start 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 stopped working with Edge 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).

Show metadata form external libraries not working

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.

NetStandard support

Could we get support for netstandard? F12 on a clr type in a project that's using netstandard brings you to the metadata information.

Ref12 never navigates to the in-page anchors (Win 10, Chrome 49)

[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:

http://referencesource.microsoft.com/System.Web/UI/UserControl.cs.html#http://referencesource.microsoft.com/System.Web/UI/UserControl.cs.html,d45c76a5f73670ef

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].

Only Community and Enterprise editions supported

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?

Proxy authentication

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.

F12 redirects to source.roslyn.codeplex.com/mscorlib/ instead of referencesource.microsoft.com

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

var target = references.FirstOrDefault(r => r.AvailableAssemblies.Contains(symbol.AssemblyName));

I'm not exactly sure how I can enable or disable the Roslyn provider when the extension is installed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.