XML-comments for function with out parameter not visible from C# project
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
XML-comments from an F# project are not showing up in a C# project when the function in question has out parameters.
#### Repro steps
Github-repo with reproduction https://github.com/viktorvan/FSharpXmlCommentBugRepro
1. Create a new F# class library `dotnet new classlib --language "F#" -n FSharpProject`
2. Add a type with xml-comments:
```fsharp
namespace FSharpProject
open System.Runtime.InteropServices //for OutAttribute
///
/// This is my type
///
type MyType() =
///
/// This is a method with an out parameter
///
/// An input string
/// An output string
static member StaticOutParam((s : string), [] result : string byref) =
result <- "test"
```
3. Setup the project to generate doc-comments, in fsproj, add:
```
true
```
4. Build the project and verify that xml-comments are generated correctly in /bin/Debug/netstandard2.0/FSharpProject.xml
5. At this point intellisense will work from within the F# project, or from another F# project referencing the original F#-project.
6. Create a new C# class library and reference the F# project. `dotnet new classlib -n CSharpProject`. `dotnet add CSharpProject/CSharpProject.csproj reference FSharpProject/FSharpProject.fsproj`
5. Add a class that uses the function from the F# project:
```csharp
using FSharpProject;
namespace CSharpProject
{
public class Class1
{
public static void Test()
{
MyType.StaticOutParam("test", out var dummy);
}
}
}
```
6. Hovering the class MyType will show the expected intellisense documentation. Hovering over the function StaticOutParam will **not** show any intellisense documentation.
#### Expected behavior
Intellisense documentation is displayed when hovering the function in the C# project.
#### Actual behavior
No intellisense documentation is shown.
#### Known workarounds
None that I have found.
#### Related information
Provide any related information
* Operating system: tested on Mac Os X 10.14.3 and Windows 10
* Branch: N/A
* .NET Runtime, CoreCLR or Mono Version: dotnet core sdk 2.2.104
* Editing Tools (e.g. Visual Studio Version): tested in VsCode 1.32.1 with Ionide 3.34.0 and also Visual Studio 2017 (latest)
* Links to F# RFCs or entries on https://github.com/fsharp/fslang-suggestions
* Links to performance testing scripts
* Indications of severity: This is an inconvenience, but not blocking.
Contributor guide
Assessment
This issue has not been assessed yet.