Let's talk about extracting information from MSBuild-based projects, like C# projects (.csproj).
I have no particular reason to do this; I just think it's cool. However, this might be useful to extract information from your build system without needing to run a full build, or as an alternative to having more complicated MSBuild logic to create an output file.
Starting in .NET 8 you can run:
```
dotnet build -getProperty:Foo
```
Instead of running a build, this will output the value of the "Foo" property. For example:
```
> dotnet build -getProperty:TargetFramework
net9.0
```
You can ask for multiple properties, in which case dotnet will return a JSON object:
```
> dotnet build -getProperty:TargetFramework,OutputType
{
"Properties": {
"TargetFramework": "net9.0",
"OutputType": "Exe"
}
}
```