.netf#visual-studio-code.net-coreionide

How can I download sources of nuget dependencies in a dotnet project in Visual Studio Code on Linux?


In Java/Maven/IntelliJ IDEA it is easy to download the Sources of Dependencies from Maven and have jump-to-declaration support for used libraries, which can be very helpful when using poorly documented libraries.

Can I do the same thing with dotnet projects (in my case an F# project with dependencies specified in myproj.fsproj)?

So far I only found decompilation support in Rider, but I would prefer the real code.


Solution

  • It's a work in progress. See https://github.com/dotnet/sourcelink

    SourceLink is a language- and source-control agnostic system for providing first-class source debugging experiences for binaries. The goal of the project is to enable anyone building NuGet libraries to provide source debugging for their users with almost no effort. Microsoft libraries, such as .NET Core and Roslyn have enabled SourceLink. SourceLink is supported by Microsoft.

    The tricky thing is that unlike Maven Central which enforces open source projects only, NuGet supports proprietary as well as open source project. So all projects have to opt-int to doing this. That means it has a very low uptake.