Solution structure
Folder structure
The solution has the following top-level folders:
assetscontains static assets, such as project logosdocscontains the source for these docsexamplecontains the source for the example projectsrccontains the main package source codetestcontains the test projects
MSBuild
The solution makes extensive use of MSBuild to standardise projects through build customisation.
eng/Build.props
The Build.props is imported early in the MSBuild sequence by Directory.Build.props. It:
- Configures project info (e.g. product name, authors)
- Configures conventions (e.g. enabling nullable types)
- Enables .NET analysers
- Adds common third-party analysers
- Configures solution-wide warnings and errors
- Configures resources to be embedded in their respective assemblies
eng/Build.targets
The Build.props is imported late in the MSBuild sequence by Directory.Build.targets. It:
- Contains common package versions
- Configures warnings and errors based on the project
eng/Packages.props
- Defines common package versions used across the solution
eng/Publishing.props
- Marks projects to be published as packages
- Configures packaging properties
- This is imported at the end of the
.csproj - Sanity checks the projects
eng/Testing.props
- Configures testing-based global usings
- Ignores some warnings not relevant to tests
eng/Version.props
- Configures the package version
Docs
The docs app consits of 4 folders:
apiwhich DocFX spits Tyne's XML Documentation intoassetsfor static assets, such as project logosdocswhere the bespoke documentation goestemplatewhere the alterations to the default template are added
Table Of Contents
Each folder contains a Table Of Contents (toc.yml). This is what the sidebar uses to generate a naviation list for the site.
Bespoke pages
The bespoke pages in Tyne's docs are broadly split into 3 categories:
docs/changes/*are change notes for each minor version of Tyne. These contain a list of changes, a migration guide from the last minor version, and links to the git changes.docs/dev/*are docs (such as this one!) designed to aid people working on the Tyne solution.docs/packages/*are docs for individual packages.
Example app
The example app is split across 4 projects:
Example.Datahosts just the data model for the example projectExample.Clientcontains the vast majority of the example projectExample.Host.Serveris solely responsible for hostingExample.Clientin a Blazor Server app- Note that this is never deployed anywhere. Instead, it is useful when developing locally as the debugging experience is more seamless than when using Blazor WASM.
Example.Host.Wasmis solely responsible for hostingExample.Clientin a stand-alone Blazor WASM app- This is the version of the docs that is deployed. This is because stand-alone Blazor WASM apps can easily be deployed statically to GitHub pages.