Where can I find the schema (XSD) for a .csproj file?
The csproj files are in fact MSBuild files. The xsd for those can be found here:
%windir%\Microsoft.NET\Framework\[framework version]\Microsoft.Build.xsd
The csproj files are MSBuild files so you should use the schema for MSBuild which is in:
%VS2008%\Xml\Schemas\1033\MSBuild\Microsoft.Build.Core.xsd
I was able to find it in %VS2008%\Xml\Schemas\1033\MSBuild\Microsoft.Build.Core.xsd
. The target namespace matches the project files' namespace, and the structure looks right.
The easiest way to figure this out is to unload that project in Visual Studio, then right-click and edit the csproj file.
- Open the Visual Studio Solution
- Unload one of the projects
- Right-click on the unloaded project in the "Solution Explorer" pane
- Click "Edit PROJECT_NAME.csproj"
- Open the "Properties" pane in Visual Studio
- Click anywhere inside the editor pane for the .csproj file
- The "Properties" pane should update with different information
- Look in the "Schemas" for a list of schemas that apply to that .csproj file
I tried this in Visual Studio 2013, but this should apply to multiple versions of Visual Studio, since at this point the .csproj file is treated like any other XML file.