<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:attribute name="WorkingDir" type="xs:string" />
  <xs:attribute name="Name" type="xs:string" />
  <xs:attribute name="Tool" type="xs:string" />
  <xs:attribute name="SkipIfProjectFailed" type="xs:boolean" />
  <xs:attribute name="Params" type="xs:string" />
  <xs:attribute name="DependsOn" type="xs:string" />
  <xs:attribute name="Env" type="xs:string" />
  <xs:element name="Task">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute ref="Name" use="optional" />
          <xs:attribute name="SourceFile" type="xs:string" use="optional" />
          <xs:attribute name="OutputFiles" type="xs:string" use="optional" />
          <xs:attribute name="InputFiles" type="xs:string" use="optional" />
          <xs:attribute ref="Tool" use="optional" />
          <xs:attribute ref="Params" use="optional" />
          <xs:attribute ref="DependsOn" use="optional" />
          <xs:attribute ref="SkipIfProjectFailed" use="optional" />
          <xs:attribute ref="WorkingDir" use="optional" />
          <xs:attribute name="Caption" type="xs:string" use="optional" />
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="TaskGroup">
    <xs:complexType>
      <xs:choice minOccurs="1" maxOccurs="unbounded">
        <xs:element ref="TaskGroup" />
        <xs:element ref="Task" />
      </xs:choice>
      <xs:attribute ref="Name" use="optional" />
      <xs:attribute ref="Tool" use="optional" />
      <xs:attribute ref="DependsOn" use="optional" />
      <xs:attribute ref="WorkingDir" use="optional" />
      <xs:attribute ref="Env" use="optional" />
    </xs:complexType>
  </xs:element>
  <xs:element name="BuildSet">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" name="Environments">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="unbounded" name="Environment">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="1" maxOccurs="1" name="Tools">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="1" maxOccurs="unbounded" name="Tool">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute ref="Name" use="required" />
                                  <xs:attribute name="AllowRemote" type="xs:boolean" use="required" />
                                  <xs:attribute name="OutputFileMasks" type="xs:string" use="optional" />
                                  <xs:attribute name="Path" type="xs:string" use="required" />
                                  <xs:attribute ref="Params" use="optional" />
                                  <xs:attribute name="OutputPrefix" type="xs:string" use="optional" />
                                  <xs:attribute name="GroupPrefix" type="xs:string" use="optional" />
                                  <xs:attribute ref="SkipIfProjectFailed" use="optional" />
                                  <xs:attribute name="SuccessExitCodes" type="xs:string" use="optional" />
                                  <xs:attribute name="WarningExitCodes" type="xs:string" use="optional" />
                                  <xs:attribute name="AutoReserveMemory" type="xs:string" use="optional" />
                                  <xs:attribute name="VCCompiler" type="xs:string" use="optional" />
                                  <xs:attribute name="AllowRestartOnLocal" type="xs:string" use="optional" />
                                  <xs:attribute name="SingleInstancePerAgent" type="xs:string" use="optional" />
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="Variables">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="1" maxOccurs="unbounded" name="Variable">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute ref="Name" use="required" />
                                  <xs:attribute name="Value" type="xs:string" use="required" />
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute ref="Name" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="1" maxOccurs="1" name="Project">
          <xs:complexType>
            <xs:choice minOccurs="1" maxOccurs="unbounded">
              <xs:element ref="Task" />
              <xs:element ref="TaskGroup" />
            </xs:choice>
            <xs:attribute ref="Name" use="required" />
            <xs:attribute ref="Env" use="required" />
            <xs:attribute ref="WorkingDir" use="optional" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute default="1" name="FormatVersion" type="xs:int" />
    </xs:complexType>
  </xs:element>
</xs:schema>
