Category Archives: F#

Visual Studio Toggle Brackets Macro

After using a F# heavily for a while, I often found myself wanting to add brackets (or rather, parentheses) around some text. This is normally when adding a type specification to an argument in order to be able to use dot notation, e.g. going from:

let typeName t = t.Name

which causes “error FS0072: Lookup on object [...]

Also posted in Visual Studio | Tagged , , , , | Leave a comment

F# CTP and Visual Studio integration

Just a quick note on an inconsistency in the F# 1.9.6.2 (CTP) release and it’s integration into Visual Studio: be aware that the standard VS environment variable $(TargetPath) is not getting set to what you’d expect. Rather than containing the full path to the output file it references the intermediate file typically in \obj\bin.
This can [...]

Posted in F# | Tagged , , , , | Leave a comment

Beware cached IDispatch

I’ve kinda given it away there with the title, but we had an interesting set of symptoms exhibited the other day while trying to call a function in an Excel workbook via F#. It appeared that the function being called would fail depending on what had been called previously. Very odd.
A bit of background: as you [...]

Also posted in .NET, COM, Debugging, Excel | Tagged , , , , | Leave a comment

F# – A little gotcha with GuidAttribute

Be careful when using the [<Guid("...")>] attribute on your COM-visible classes in F#. If you mistakenly use the curly-bracket delimited format for the GUID, regasm will silently, yes, silently, fail to add any CLSID entries for your class. That means it will be cocreatable by the prog ID, but not the CLSID. Ouch.
No doubt this will be [...]

Also posted in .NET, COM | Tagged , , | Leave a comment
  • Follow me on Twitter Follow me on Twitter @voyce

  • Categories

  • Archives