Sunday, August 16, 2009

Writing PowerShell cmdlets in F# -- May CTP

Yeah, slowpoke...

It took me a while -- three months -- to realise that I hadn't seen one way or the other whether the problem with abstract internal members a couple of levels back up the inheritance tree (that thwarted my previous attempt back at the end of last year) had been fixed in the May CTP.

The cmdlet code is unchanged in the Feb 2010 (v 1.9.9.9) CTP.

Well, I can report that building

#light
type MyCommandSnapIn() =
inherit System.Management.Automation.PSSnapIn()
override x.Name with get () = "MyCommands"
override x.Description with get() = "MyDescription"
override x.Vendor with get() = "MyVendor"
view raw gistfile1.fs hosted with ❤ by GitHub

now actually succeeds. So there should be nothing stopping us writing a full PowerShell snap-in in one F# assembly.

No comments :