Question

I may have this completely wrong, but my understanding is that the --standalone compiler option tells the compiler to include the F# core and other dependencies in the exe, so that you can run it on another machine without installing any 'runtime'.

However, I can't get this to work in the CTP - it doesn't even seem to change the size of the output file (docs I've read say about 1M extra).

"Google may know, but if it does, it ain't telling, or I'm not looking in the right place"

UPDATE:

It seems to work with latest CTP update 1.9.6.2

UPDATE2:

I have since experienced another error:

FSC(0,0): error FS0191: could not resolve assembly Microsoft.Build.Utilities.

If you get errors like this when trying to compile --standalone, you need to explicitly include them as references in your project.

Was it helpful?

Solution

Answer from MS:

There is a CTP update 1.9.6.2 that fixed some --standalone bugs.

I'm reinstalling now...

UPDATE: Works for me - so the my accepted answer is download CTP update 1.9.6.2.

OTHER TIPS

F# manual: Statically linking the F# library using "--standalone"

Did you try to run peverify.exe utility?

This has been a pet hatred of mine for a long time (it has been broken in every CTP release ever including the latest 1.9.6.16 May 2009 release). The "solution" is essentially to write your own build system that is not broken.

This is a real problem for me because I have accumulated hundreds of great F# programs that I would like to put on our site but it takes hours to build each one into a standalone executable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top