Schema: TargetOrImportType causes validation failures in otherwise fine .csproj files
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 139
Description
https://github.com/dotnet/msbuild/blob/f93b24b5a88a37a3b6b122c7f65f910fcc2ba2f0/src/MSBuild/MSBuild/Microsoft.Build.Core.xsd#L12

Adding a `` or `` removes the warning, but these are not required for most .csproj files, so this should be marked as an optional in the sequence.
## Reproduce
VSCode w/ XML extension
Sample simple .csproj generated with `dotnet new classlib`
```xml
net7.0
enable
enable
```
And vscode settings:
```json
{
"xml.fileAssociations": [
{
"pattern": "**/*.csproj",
"systemId": "https://raw.githubusercontent.com/dotnet/msbuild/main/src/MSBuild/Microsoft.Build.xsd"
}
],
"xml.validation.namespaces.enabled": "onNamespaceEncountered"
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.