Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Where is the `.fsproj` project file documented?
More specifically: Is there a dedicated docs page listing "properties" that are idiosyncratic to F#
.fsproj project files?
Why am I asking?
Started learning F# a couple of days ago, but just now starting to realize that I will also have to learn the .NET ecosystem as well:
Came across the Signatures page in the F# documentation, so I wanted to try out generating an
.fsi signature file. Had (and will have) some hurdles with creating a toy project on the terminal, but once I figured it out, I ran into this same issue: How to generate F# signature file (without Visual Studio)?
This article describes compiler command-line options for the F# compiler. The command
dotnetbuild invokes the F# compiler on F# project files. F# project files are noted with the
The compilation environment can also be controlled by setting the project properties. For projects targeting .NET Core, the "Other flags" property,
.fsproj, is used for specifying extra command-line options.
At this point I started wondering: I would probably want to tweak my projects later on, and the central
.fsproj project files seem to be the best place to do so. Where is it documented? It's XML so there has to be a schema too, etc.
Spoiler: found the MSBuild Project File Schema Reference after a while.)
Sifting through search results (while having no prior .NET experience whatsoever), I learned that the
.fsproj file "is an MSBuild script", and MSBuild is used by every .NET language and framework. (I found the ASP.NET Core's Understanding the Project File docs page way better than the any of the MSBuild articles...)
Long story short, I do need to go through the MSBuild docs at one point, but it would be nice to know if there is a dedicated
.fsproj project file page.
You can generate the XML file at compile time by doing one of the following:
You can add a
GenerateDocumentationFileelement to the
<PropertyGroup>section of your
.fsprojproject file, which generates an XML file in the project directory with the same root filename as the assembly. For example:
For more information, see