Make Is*Project properties unambiguous and improve IsGeneratorProject detection (#65896)
* Make Is*Project properties unambiguous
Currently these properties exist which categorize projects:
- IsReferenceAssembly: The project's parent directory is 'ref'
- IsGeneratorProject: The project's parent directory is 'gen'
- IsTestProject: The project is located somewhere under a '/tests/'
directory and the project name's suffix is either
'.Tests' or '.UnitTests'.
- IsTrimmingTestProject: Same as IsTestProject but the project name's
suffix is '.TrimmingTests'.
- IsTestSupportProject: The project is located somewhere under a
'/tests/' directory and the above IsTestProject
property is false.
- UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK
- UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK
- IsRuntimeAssembly: True when all above is false
- IsSourceProject: True when the project's parent directory is 'src'
The IsRuntimeAssembly and IsSourceProject properties meanings are
ambiguous and the property names aren't consistent (IsReferenceAssembly
vs IsGeneratorProject).
I'm changing the above to the following:
- **IsReferenceSourceProject: The project's parent directory is 'ref'
or the parent of the parent directory is 'ref'**
- IsGeneratorProject: The project's parent directory is 'gen'
- IsTestProject: The project is located somewhere under a '/tests/'
directory and the project name's suffix is either
'.Tests' or '.UnitTests'.
- IsTrimmingTestProject: Same as IsTestProject but the project name's
suffix is '.TrimmingTests'.
- IsTestSupportProject: The project is located somewhere under a
'/tests/' directory and the above IsTestProject
**and IsTrimmingTestProject** props are false.
- UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK
- UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK
- IsSourceProject: **True when all above is false.**
* React to PR feedback