9

All I can find from Microsoft is two blog posts:

These blog posts explain:

  • how to enable it
  • how to convert your old solution files to it
  • how cool it is
  • etc.

...but being mere blog posts, they do not constitute documentation.

More specifically, they do not explain:

  • what XML elements are supported and what they do.
  • what XML attributes each element supports, and what they do.

So, where is the documentation?


I had this in a comment, but some Microsoft fanboy playing god with their admin privileges deleted it, so here it is, again:

Has humanity entered a brave new era where engineers are capable of putting into use highly complex technical constructs with just some hand-wavy, wishy-washy descriptions? I feel so old, and so left behind.

22
  • 2
    Who needs documentation, when you can do trial and error for weeks? Also, we have AI to help you. And, you're a developer, you can reverse engineer that. </sarcasm> Commented May 5 at 12:17
  • 4
    "Has humanity entered a brave new era where engineers are capable of putting into use highly complex technical constructs with just some hand-wavy, wishy-washy descriptions" -- to play devil's advocate here, who said you're supposed to be writing those files by hand? If you're meant to be using the tooling to create/edit them, then the only documentation of the format that matters is MS's internal documentation Commented May 5 at 12:18
  • 2
    @canton7: just look at the hundreds of answers here on SO where you need to edit something in the .sln, .csproj or other files in order to get something done, simply because MS does not offer a UI option for that. (1040 candidates for this claim) Commented May 5 at 12:30
  • 2
    Also, don't forget that publicly documenting something creates a contract that Microsoft need to keep. They almost certainly don't want to create such a contract at this stage, because they want to retain the ability to change the format if it turns out that's necessary. Commented May 5 at 13:27
  • 2
    Even if you don't have to edit a .slnx by hand, tool-makes need such a documentation. Did the Rider developers have access to the internal Microsoft docs? Commented May 5 at 13:28

2 Answers 2

20

"New, Simpler Solution File Format" links to the repository microsoft / vs-solutionpersistence of a package providing "Shared serializers and models for Visual Studio solution files. Handles traditional .sln file and new .slnx file."

Digging into that, I found Slnx.xsd, which I assume is the schema of those files.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Solution">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="Configurations" type="Configurations" minOccurs="0"/>
                <xs:element name="Project" type="Project" minOccurs="0" maxOccurs="unbounded" />
                <xs:element name="Folder" type="Folder" minOccurs="0" maxOccurs="unbounded" />
                <xs:group ref="PropertiesGroup" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:attribute name="Description" type="xs:string" />
            <xs:attribute name="Version" type="xs:string" />
        </xs:complexType>
    </xs:element>

    <xs:complexType name="Configurations">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="BuildType" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Name" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name ="Platform" minOccurs="0" maxOccurs="unbounded" >
                <xs:complexType>
                    <xs:attribute name="Name" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="ProjectType" type="ProjectType" minOccurs="0" maxOccurs="unbounded" />
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="ProjectType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:group ref="ConfigurationRulesGroup" minOccurs="0" maxOccurs="unbounded"/>
        </xs:choice>
        <xs:attribute name="TypeId" type="xs:string" />
        <xs:attribute name="Name" type="xs:string" />
        <xs:attribute name="Extension" type="xs:string" />
        <xs:attribute name="BasedOn" type="xs:string" />
        <xs:attribute name="IsBuildable" type="xs:boolean" default="true" use="optional" />
        <xs:attribute name="SupportsPlatform" type="xs:boolean" default="true" use="optional" />
    </xs:complexType>

    <xs:complexType name="Folder">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="File" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Path" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="Project" type="Project" minOccurs="0" maxOccurs="unbounded"/>
            <xs:group ref="PropertiesGroup" minOccurs="0" maxOccurs="unbounded"/>
        </xs:choice>
        <xs:attribute name="Name" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="Project">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="BuildDependency" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Project" use="required" />
                </xs:complexType>
            </xs:element>
            <xs:group ref="ConfigurationRulesGroup" minOccurs="0" maxOccurs="unbounded"/>
            <xs:group ref="PropertiesGroup" minOccurs="0" maxOccurs="unbounded"/>
        </xs:choice>
        <xs:attribute name="Path" type="xs:string" use="required"/>
        <xs:attribute name="Type" type="xs:string" />
        <xs:attribute name="DisplayName" type="xs:string" />
    </xs:complexType>

    <xs:group name="PropertiesGroup">
        <xs:choice>
            <xs:element name="Properties">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Property" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:attribute name="Name" type="xs:string" use="required" />
                                <xs:attribute name="Value" type="xs:string" />
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="Name" use="required" />
                    <xs:attribute name="Scope" fixed="PostLoad" />
                </xs:complexType>
            </xs:element>
        </xs:choice>
    </xs:group>

    <xs:group name="ConfigurationRulesGroup">
        <xs:choice>
            <xs:element name="BuildType" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Solution" type="xs:string" use="optional" />
                    <xs:attribute name="Project" type="xs:string" use="optional" />
                </xs:complexType>
            </xs:element>
            <xs:element name="Platform" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Solution" type="xs:string" use="optional" />
                    <xs:attribute name="Project" type="xs:string" use="required" />
                </xs:complexType>
            </xs:element>
            <xs:element name="Build" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Solution" type="xs:string" use="optional" />
                    <xs:attribute name="Project" type="xs:string" use="optional" />
                </xs:complexType>
            </xs:element>
            <xs:element name="Deploy" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="Solution" type="xs:string" use="optional" />
                    <xs:attribute name="Project" type="xs:string" use="optional" />
                </xs:complexType>
            </xs:element>
        </xs:choice>
    </xs:group>
</xs:schema>```
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for finding this and posting it. Of course I am up-voting this, because it is useful, but as you probably understand I cannot accept it as the answer because this is not "the documentation".
3

There is no public official complete specification and documentation for SLNX files. The same is true for the older SLN files. There are details in other documentation, in blog posts, in open source code, and in other sources. That may not be enough but it is what is available.

I can speculate about why the documentation doesn’t exist (at this time). The file format could still be considered to be evolving and not finalized. Or publishing a public specification could be an extremely low priority. Regardless, “the documentation” currently doesn’t exist and may never exist.

Update

SLNX files are a released feature as of the May 13, 2025 release of Visual Studio 2022 version 17.14. (See "Clean up sln (VisualStudio solution) files".)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.