Open rollsch opened 3 years ago
Thanks for the suggestion! This can be done, but my previous experience with VS extensions wasn't very positive (always large effort for initial investigation work and then large effort for maintenance work between versions). Not sure if Rider experience is better, hopefully so.
It is more likely that I look into integrating into something like GitHub Codespaces, which is already online -- but I haven't had a chance to do any investigation for that yet.
I would love to help and build this extension for Visual Studio. The only thing I need is SharpLab in a consumable form such as a .dll I can call to retrieve the disassembly from any c# string I pass to it.
@madskristensen That would be great!
To clarify the approach:
I can do string-to-string, but in VS context you might have the Compilation
object already with the correct references and options -- would it be better to pass in some parts of Roslyn object model instead of a string? E.g. a Compilation
and a root SyntaxNode
for the segment you want to decompile?
Btw your editorconfig extension was one of the most essential extensions I used to rely on everyday (until VS integrated some of the support). Also used to rely on the web essentials ones very actively. Thanks for those!
@ashmind I must admit that I don't know how your websites works and how Roslyn is involved. What I was thinking about from a user scenario perspective is that they can see the disassembly in realtime'ish updating as they type in the .cs file in VS.
@sharwell, is there a way a (MEF) extension can access the Compilation
object and a root SyntaxNode
from any open .cs file?
Thanks! What's the current target framework requirement for VS extensions?
It can do up to .NET Framework 4.8
Hmm, SharpLab does have a .NET Framework version but that's in maintenance mode rather than being actively updated. Though feature set is still close enough, and it's not like there is an alternative anyways, so I'll use that.
Tagging @EgorBo here, because his extension does the same thing, but needs a runtime repo source code built!
I'm using JetBrains Rider everyday, I know about the integrated IL Viewer, I use it, but I just found out there is a control to select "level"; this option must be new IMO.
Has anyone ever developed a plugin like the "IL Viewer" for jetbrains Rider which utilises sharplab?
I constantly paste code back and forth when optimising code and I think a plugin would be extremely useful. I also use dnspy on my built DLLs when the code is not trivial to paste into sharplab.
It might not even be that difficult to develop. Id consider contributing if someone here has jetbrains plugin development experience.
Here is how the IL Viewer looks currently.