Projects, Files and Compilation Order

File order is significant in F#. Definitions must come before use (within a file, too). This prevents cyclic dependencies and makes code easier to follow top to bottom. Use rec modules/namespaces (module rec, namespace rec) or and for mutually recursive types.

XML documentation comments: /// <summary>...</summary> or plain /// text.

<!-- MyApp.fsproj -->
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarnOn>3390</WarnOn>                         <!-- extra warnings, e.g. XML doc checks -->
    <Nullable>enable</Nullable>                   <!-- F# 9 nullness checking -->
  </PropertyGroup>
  <ItemGroup>
    <!-- ORDER MATTERS: a file can only use definitions from files ABOVE it -->
    <Compile Include="Domain.fs" />
    <Compile Include="Validation.fs" />
    <Compile Include="Database.fs" />
    <Compile Include="Program.fs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="FSharp.SystemTextJson" Version="1.3.13" />
  </ItemGroup>
</Project>