FsAutoComplete
FsAutoComplete copied to clipboard
IntelliSense doesn't work for Office interop assemblies
ref https://github.com/ionide/ionide-vscode-fsharp/issues/714
Consider the following code script:
#if INTERACTIVE
#r "Microsoft.Office.Interop.Outlook.dll"
#endif
open Microsoft.Office.Interop.Outlook
let getFullName userName =
let outlook = ApplicationClass()
let message = outlook.CreateItem(OlItemType.olMailItem) :?> MailItem
message.Recipients.Add(userName) |> ignore
message.Recipients.ResolveAll() |> ignore
message.Recipients
|> Seq.cast<Recipient>
|> Seq.map (fun r -> r.AddressEntry.GetExchangeUser().Name)
|> Seq.head
The project loading fails to resolve Microsoft.Office.Interop.Outlook
checked in vs2015 and load correctly.
It doesnt work with neither new project loader nor projectcracker
Is this still an issue? The corresponding Ionide issue was closed.
For the above script, if you reference the DLL like below, it works fine for me:
#r @"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Outlook.dll"