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.
Comments on Where is the `.fsproj` project file documented?
Parent
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)?
The answer had the solution, but no links. It did mention the --sig
compiler option, and the F# Compiler options page does mention at the very top that:
This article describes compiler command-line options for the F# compiler. The command
dotnet
build invokes the F# compiler on F# project files. F# project files are noted with the.fsproj
extension.The compilation environment can also be controlled by setting the project properties. For projects targeting .NET Core, the "Other flags" property,
<OtherFlags>...</OtherFlags>
in.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.
Another example from the Document your code with XML comments article in the F# docs:
You can generate the XML file at compile time by doing one of the following:
You can add a
GenerateDocumentationFile
element to the<PropertyGroup>
section of your.fsproj
project file, which generates an XML file in the project directory with the same root filename as the assembly. For example:<GenerateDocumentationFile>true</GenerateDocumentationFile>
For more information, see
GenerateDocumentationFile
property.
Post
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
toraritte |
Thread: Works for me Thanks! I figured as much, and, at this point, I'm just going to use my question to document stuff I find:) |
Nov 13, 2023 at 21:11 |
No, there is no single page.
Simple answer - different project requires specific properties.
For example, building a mobile app you'd be interested in whether NativeAot is enabled or not. More specific, building an Android app you can specify AndroidPackageFormats
, AndroidLinkTool
, etc. Those properties don't exist (or rather doesn't make any sense for console app).
Also while dotnet ecosystem is grows new and new properties are added. For example, UseMauiEssentials
. Attempt to enumerate everything at once just adds a headache while learning.
So though I agree it's confusing and definitely can be improved single page won't help.
0 comment threads