Skip to content

F# Compiler Options: incorrect information about <output-filename> for -a and --target #3108

@nightroman

Description

@nightroman

https://github.com/dotnet/docs/blob/master/docs/fsharp/language-reference/compiler-options.md

-a**<output-filename>**
Generates a library and specifies its filename. This option is a short form of --target:library**<filename>**.

--target:[exe | winexe | library | module ] <output-filename>
Specifies the type and file name of the generated compiled code.
...

I think <output-filename> is either not supported or the docs should tell how to use it.

But it looks like

  • -a is a simple switch;
  • --target is a named parameter with one value, not two

and the output file name is specified by the provided option -o|--out.

The documentation refers to /target (C# Compiler Options).
This page does not tell anything about extra <output-filename>.

Simple tests show errors that -a does not expect a parameter:

> fsc -a z.dll Q1.fs
error FS2020: The assembly 'z.dll' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'.

> fsc -a:z.dll Q1.fs
error FS0243: Unrecognized option: '-a'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions