Skip to content

Instantly share code, notes, and snippets.

@JordanMarr
Created November 15, 2018 23:33
Show Gist options
  • Save JordanMarr/7be904438d392821e90e1c5fe0cca44d to your computer and use it in GitHub Desktop.
Save JordanMarr/7be904438d392821e90e1c5fe0cca44d to your computer and use it in GitHub Desktop.
Reproducing F# intellisense bug when opening C# namespace with extension methods containing unreferencedtypes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsharpProjWithExt
{
public static class Extensions
{
/// <summary>
/// An extension method that references "System.Windows.Forms" assembly.
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
public static string FormToString(this System.Windows.Forms.Form form)
{
return form.ToString();
}
}
}
open CsharpProjWithExt
[<EntryPoint>]
let main argv =
let dir = new System.IO.DirectoryInfo("C:\temp")
// Intellisense fails when dotting into "dir" fails once "CsharpProjWithExt" is opened.
// Commenting out the open statement (or commenting out the extension method) restores intellisense.
let parentName = dir.Parent.FullName
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment