josephwoodward / VSCodeILViewer

A Visual Studio Code C# IL (Intermediate Language) Viewer
MIT License
98 stars 17 forks source link

Support csproj #9

Open phrohdoh opened 7 years ago

phrohdoh commented 7 years ago

project.json is on its way out of the door while (the newly-improved) csproj is becoming the default.

josephwoodward commented 7 years ago

Yes, this is on my list of things to do over the next few days. Support for both project.json and .csproj should hopefully be in the next release.

josephwoodward commented 7 years ago

This is a real blocker right now, MSBuildWorkspaces does not support .NET Standard and there's no other approach, so I'm not sure how I'm going to tackle this. Could really do with some advice from someone with a far greater knowledge of Roslyn than me.

phrohdoh commented 7 years ago

Why does .NET Standard need to be supported by a tool that automates compilation of a project then runs ildasm?

josephwoodward commented 7 years ago

Unfortunately it's a little more complicated than what (not to mention ildasm is Windows only, where as this extension works on all platforms). What's actually happening is under the bonnet the extension is using Roslyn to compile just the file you're trying to extract the IL from.

In order to this it uses the workspace to extracting all that file's dependencies in the process.

I'm sure there's a way around it, I just need to investigate how.

josephwoodward commented 7 years ago

I've actually got this open as a StackOverflow question too.

phrohdoh commented 7 years ago

What I don't understand is why you need .NET Standard support to use the MSBuild Roslyn workspace. Do you have a gitter or IRC channel?

josephwoodward commented 7 years ago

Because the extension loads the project then includes all references (dlls, NuGet packages) so all types are available. I can do that manually but the workspace API makes it easy. It's possible that there's another way that I'm not aware of? Do you know something I don't?

josephwoodward commented 7 years ago

Here's a GitHub issue about the discussion of making the MSBuildWorkspace support .NET Standard: https://github.com/dotnet/roslyn/issues/17439 TLDR; it's a little while away. In the mean time the extension doesn't work with .csproj :(

replicadse commented 6 years ago

As the other Issues are closed now or their state is undeterminable due to them being open since 2017, could you Kindly provide any information when or if the .csproj support will be continued? That would be awesome since I'd like to use your extension for working on my bachelor thesis.