How to make an F# project work with the object browser
Asked Answered
S

0

6

I have used the sample F# Empty WPF project and pulled in Paul Bett's ReactiveUI project via Nuget. Normally when I press (shift-f2) on an identifier in C#/VB.Net it takes me to the object browser so I can explore the interface of the object. However two problems.

  • Initially ReactiveUI is not even available in the Object Browser. I had to go to the soution explorer and explicity click view in object browser on each reference and then they appeared in the object browser. Perhapps this is intended for F# projects??

  • Second when I do have a symbol in my F# code, say an instance of ReactiveObject and do (shift-f2) I get an error cannot navigate to definition. Source code not available.

So my question is how can I solve the two above problems, the second being the most important.

Sporocyst answered 14/12, 2012 at 6:35 Comment(10)
The second issue has always been the behavior in VS2010 and VS2012 – I'd be surprised if there is a fix.Sunderland
Given that the intellisense can show the correct type and XML doc it surprises me that its not a trivial fix to implement. I'll find it hard to convince the team to try f# if its hard to browse API in the browser.Sporocyst
Possible duplicate: #7128631Althing
Do you really want to see the underlying objects?Hyehyena
Let's say i want to browse the api from visual studio. For example I cursor over fst and press f12 it would be nice to see the doc for fst and then at a glance see all other functions associated with the list module. I think we are being pedantic here if we worry about it being called an "object" browser. Id call it a doc explorer.Sporocyst
These are limitations of Visual Studio, these kind of tasks are not very common in F#. If you use MonoDevelop then a working object browser down to code is available.Hodges
:) tried getting mono develop working yesterday under osx. It's broken. I have another SO question open on that issue.Sporocyst
MonoDevelop is fine under OSX, are you talking about the F# binding?Hodges
Yeah sorry. I meant the f# binding.Sporocyst
Please raise any issues found under: github.com/fsharp/fsharpbinding/issues?state=open Im trying to get a list of those that need to be resolved.Hodges

© 2022 - 2024 — McMap. All rights reserved.