-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object Browser is not populated with assemblies refernced by fsproj #3512
Comments
@Pilchie Any idea what we need to implement to get the Object Browser to light up? Does anyone use this much in C#? |
Note that it is also empty for .NET Framework 4.7-based F# projects, so this isn't specific to .NET Core. |
Well in full .NET Visual Studio displays F# projects from solution as external assemblies. I hope this will finally work in some update of VS 2017, will it? |
@cartermp, so when will this finally be implemented? |
This is a feature request and not a part of our plans around:
Thus there is no timeline. We may get it it, but there is no guarantee. We certainly welcome a pull request, though. |
If someone can explain what approximately implement and where I can handle that. |
@xperiandri In the context of the old project system I had thought it was a matter of implementing IVsSimpleLibrary2, see https://msdn.microsoft.com/en-us/library/bb165783.aspx. In the context of the new project system https://github.com/dotnet/project-system/ the answer may be different however, and I don't understand why the new project system wouldn't at least be showing F# references as external assemblies. Surprisingly the new project system doesn't seem to implement IVsLibrary, IVsLibraryMgr, IVsSimpleLibrary2 or any such interfaces based on a quick search. I must however be missing something. |
@xperiandri There is an implementation of IVsLibrary in Roslyn , which may be related https://github.com/dotnet/roslyn/blob/614299ff83da9959fa07131c6d0ffbc58873b6ae/src/VisualStudio/Core/Def/Implementation/Library/AbstractLibraryManager_IVsLibrary.cs#L9 I don't know what it would mean to light up this functionality for F#. It may be quite simple (especially if similar functionality has been lit up for TypeScript, which builds its VS support on the same code), but I think we need help from the Roslyn people to be given a rough guide. |
@dsyme where can I get |
@Pilchie |
Any updates about this? How far is it in the backlog? |
This is really unfortunate. I really doubt F# will gain much traction unless tooling support is greatly improved. Which is such a shame, because, again, F# is such a wonderful language. |
@rent-a-developer, is the object browser lacking knowledge of F# assemblies the reason for your feedback? Do you encounter times where writing other language than F# code in Visual Studio also feels a bit like notepad or is it specific to F#? and would you mind reporting specific issues about it? Regarding doubts of F# gaining traction, it doesn't rely solely on Visual Studio tooling, but as I have been using it to write F#, I feel it has gained attention from Microsoft, over the years. What you express feels like what I was hearing back then, and I am not sure the arguments about F# gaining traction, related to tooling, hold as much weight as they did (when there was no refactor support, and very basic navigation only). @rent-a-developer, regarding object browser, can you adjust by using ILSpy or similar in meantime for similar needs? ILSpy shows a treeview which is pretty similar. Also, do you have specific stance as to if the object browser should propose another representation, specific to F# (to show modules as such, etc.) or just the "how it looks at CLI API surface level" is what you'd like? Thanks. |
Full F# semantics would be nice. Along with that same semantics in Solution Explorer file nodes. |
But my issue was that Object Browser does not work at all if you don't have a single C#/F# project in your solution. And for F# projects no dependencies are displayed there. |
|
No. It's not just the issue with the object browser. One of the worst parts so far has been the error messages generated by the F# compiler when there is some problem with my F# code. And it's just that tooling support for F# feels way worse than for C#. I could switch from VS to JetBrains Rider, but this requires a lot of (re-) learning and changing of habits, because working with Rider is very different than working with VS. Often when I write down the name of a type, Rider does not offer auto complete or to automatically add a proper import declaration. Take for example this F# code:
Rider does not offer to add a "open FSharp.Data" to import the type even tough the FSharp.Data.SqlClient NuGet package is installed. I encounter such problems very rarely when writing C# code. Another issue is that quite a few F# libraries seem to be broken or not up to date. Since I started learning F# there where many times where I felt like I am fighting against F# instead of benefiting from its rich feature set. But it doesn't feel as smooth as when I was learning C# back in the days (at least I think so :-)). Another issue is the lack of a F# decompiler. There seems to be a plugin for ILSpy (https://code.google.com/archive/p/ilspy-decompilation-to-fsharp-plugin/), but that project seems to be abandoned. Which brings me to another issue: Another issue is the lack of good support for WPF. Also, it would be really nice if I could mix F# and C# code in one project. Mixing C# and F# in one solution could also be improved: But when I change some code in the F# project (lets say I add a function to a module) IntelliSense does not pick up this change when I am in the C# code (Using the added function in C# gives me IntelliSense error).
No, it's specific to F#. Sometimes it just feels like the IDE is not helping me AT ALL writing F# code. Having said that, I do still think that F# is a wonderful and very powerful language and that the projects I am working on can greatly benefit from using it. I just wish MS would treat F# as a first class citizen like it does with C#. But I guess this is a classic chicken-and-egg problem:
Thanks for the tip! |
FWIW I think it is far more valuable to improve things like this:
than features like Object Browser, which tend to have quite low use. The inverse work is already done actually - you don't need to recompile C# code to see changes reflected in F#.
This is something that I believe @dsyme and @KathleenDollard are very interested in learning more about. There's several areas known to be obtuse - the compiler doesn't give much help in solving the compile error - and there is a lot of value in understanding specific circumstances that lead to an obtuse error and confusing experience. It's complicated work but essential for people learning the language to feel like they're successful. If you don't have pains like this, my belief is that lack of support for miscellaneous things that Visual Studio ostensibly supports for all languages becomes less of a worry. But when there are issues like this, it makes everything feel worse. |
Object Browser tool window of Visual Studio is not populated with assemblies referenced by F# projects
Repro steps
Object Browser
Expected behavior
Object Browser tool window is populated with all the assemblies referenced by F# projects
Actual behavior
Object Browser tool window is empty
Related information
The text was updated successfully, but these errors were encountered: