Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using COM from an F# script

Tags:

f#

com

How do I use COM libraries from an F# script? Is it even possible? How do I reference the required COM libraries in an .fsx file?

More specifically, I'd like to use InstallShield Automation from a build script. Despite all my efforts, I could only get it to work with a regular compiled project.

Edit: I already tried the COM type provider project. However, it doesn't seem to find any types in the particular COM library I'm interested in. If it's a bug or intended behavior, I don't know.

like image 302
Sammy S. Avatar asked Feb 16 '26 20:02

Sammy S.


1 Answers

I think possibly maybe the COM type provider might help you out:

One advantage of this method is that you can author and deploy F# scripts without having to pre-generate the interop assemblies. Another advantage is that you can easily explore all the COM components installed on your machine via intellisense.

And yes I did just google it, which OP also might have done before asked here.

like image 98
Helge Rene Urholm Avatar answered Feb 18 '26 13:02

Helge Rene Urholm