XML format
MSBuild project
A .NET project file: a build script in XML where element names are targets and item groups, and evaluation order decides what a property means.
A .csproj is the .NET equivalent of a POM, and like a POM it is a build program rather than a manifest. PropertyGroup sets variables, ItemGroup collects files and package references, and Target defines work — all of it evaluated in document order, which is the part that surprises people coming from declarative formats.
The SDK-style project introduced in .NET Core dropped the namespace and most of the boilerplate: a modern .csproj is a dozen lines because <Project Sdk="…"> imports the rest. Older projects still carry the 2003 MSBuild namespace, and tools that match on element names without accounting for both shapes see one and not the other.
- SDK-style projects declare no namespace; legacy ones use http://schemas.microsoft.com/developer/msbuild/2003. An XPath that assumes either will miss the other.
- Properties are evaluated in order, so a later PropertyGroup overrides an earlier one — and an imported .props file lands where the Import sits.
- Condition attributes are evaluated as MSBuild expressions, not XPath, and a typo in one silently evaluates false.
- Globbing is implicit in SDK-style projects; listing a .cs file explicitly usually produces a duplicate-item error.
- Directory.Build.props applies to every project beneath it without being referenced, so the effective build is not visible in this file alone.
- Root element
<Project>- Media type
application/xml- Extensions
.csproj, .fsproj, .vbproj, .props, .targets- Namespaces
- None — unqualified elements
- XMLDir label
- —
Specification: MSBuild project file schema
A minimal valid document
Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.4"/>
</ItemGroup>
<Target Name="Stamp" AfterTargets="Build">
<Message Importance="high" Text="Built $(AssemblyName)"/>
</Target>
</Project>Other formats
- XML sitemap
- Sitemap index
- RSS 2.0
- Atom 1.0
- SOAP envelope
- XML Schema (XSD)
- WSDL
- XSLT stylesheet
- SVG
- OPML
- RDF/XML
- GPX
- KML
- XLIFF
- UBL Invoice
- JUnit XML
- Maven POM
- SAML 2.0
- Property list
- DocBook 5
- JATS article
- MusicXML 4.0
- MathML
- XSL-FO
- OOXML document
- Android manifest
- Android strings
- Log4j 2 config
- JaCoCo report
- Checkstyle report
- EPUB package
- XMP metadata
- TEI document
- ISO 20022 pain.001
- HL7 CDA
- TTML captions
- OpenStreetMap XML
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.