Project Module
Reading of MSBuild project structure for the type provider. The same split as `Git`: structure - which projects exist, where they live - is read from the solution file or the directory tree at design time, so expanding the provided types never spawns a process and never loads MSBuild into the compiler. Property *values* are read at runtime by `Runtime`, which shells out to `dotnet msbuild -getProperty`. The design-time values are deliberately approximate. They are read straight out of the project XML with no condition evaluation, and exist only to be shown in a doc comment as a hint. Nothing compiles against them.
Types and nested modules
| Type/Module | Description |
|
Minimal reader for the flat `{"Properties":{"Name":"value"}}` object that `dotnet msbuild -getProperty` emits. A dependency-free scanner rather than a JSON library, because the designer assembly targets netstandard2.0 and carries no runtime dependencies. |
|
|
Functions invoked from erased quotations - they run in the *consuming* program, not in the compiler, and must never throw. |
|
|
A project as it appears in the tree, with everything needed to name it, to point `dotnet` at it, and to find the `Directory.Build.props` above it. |
Functions and values
| Function or value |
Description
|
Full Usage:
DefaultVersion
Returns: string
|
MSBuild's own default for a project that never declares `
|
Full Usage:
defaultProperties
Returns: string list
|
The properties given a member of their own on every provided project. The same list is requested in one batch at runtime, so adding to it costs nothing extra per member.
|
|
Every project belonging to `root`, taken from its solution file when there is one and from the directory tree otherwise. Sorted by name, and never throws: an unreadable tree yields an empty list.
|
|
The hint shown for `name`, or "" when the project does not declare it. `Version` falls back to MSBuild's default rather than to "", because that is what a runtime read will report.
|
Full Usage:
hints root reference
Parameters:
string
reference : ProjectRef
Returns: Map<string, string>
|
Best-effort property values for a project, read from XML with no condition evaluation: the last assignment of a name wins, whatever guarded it. Good enough for a doc comment and for nothing else.
|
Full Usage:
solutionFile root
Parameters:
string
Returns: string option
|
The solution file governing `root`, preferring `.slnx` over `.sln` when a repository carries both during a migration.
|
Partas.TypeProvider