What is the CD file format?
.cd is a file format used by the Visual Studio software development environment. .cd files store class diagrams that help visualize and analyze the source code structure. A class diagram is generated based on the application code and the types it defines, and .cd files store this diagram data in XML markup. Class diagram files can only be created for code written using an object-oriented paradigm.
The .cd class diagram format follows the UML general-purpose modeling language and is one of the foundational tools used in designing software architecture. Diagrams visualize all classes and their relations along with their methods and attributes. Relations between classes are represented using standardized graphical symbols such as differently shaped arrows and lines denoting inheritance, association, and composition.
Importantly, a .cd file stores only the visual layout of the diagram - positions, sizes, and which compartments are collapsed - rather than duplicating source code. It references code types by fully qualified name. Deleting a .cd file removes the diagram view but leaves the underlying source files untouched. The format is fully supported in Visual Studio 2022 and is not available in Visual Studio Code. The XML inside is human-readable and can be opened in any text editor, though only Visual Studio renders it as an interactive diagram.
Security & safety
RISK: LOWA .cd file is plain XML with no executable code; it is safe to open. It contains only diagram layout data referencing class names in a project.
Format details
in a nutshell- CD-i / VCD disc image (CDI) - Some disc-imaging tools historically used .cd for CD image files, but IsoBuster primarily uses .cdi - the .cd overlap is minimal.
Programs that open CD files
Technical details
deep spec| Format type | XML-based class diagram descriptor (plain text) |
| Root element | `<ClassDiagram MajorVersion="1" MinorVersion="1">` identifies the file |
| Schema version | MajorVersion=1, MinorVersion=1 (current; unchanged since Visual Studio 2005) |
| Content stored | Visual layout only - positions, sizes, collapsed compartments; references source types by fully qualified name |
| Child elements | `<Class>`, `<Struct>`, `<Interface>`, `<Enum>` nodes mapped to project source types |
| Text encoding | UTF-8 |
| Typical file size | 2 KB - 200 KB, scaling with the number of classes on the diagram |
| MIME type | `application/xml` |
| Paradigm requirement | Requires object-oriented source code (C#, VB.NET, or C++/CLI projects in Visual Studio) |
| Platform restriction | Windows only - Class Designer is not available in Visual Studio Code |
| Deletion behavior | Deleting a `.cd` file removes only the diagram view; underlying source files are unaffected |
| UML conventions | Diagram uses UML symbols for inheritance, association, and composition between classes |
| Released | 2003 (Visual Studio .NET 2003, Class Designer add-in); built-in since VS 2005 |
| Latest version | Visual Studio 2022 (current; format schema largely unchanged since VS 2005) |
| Specification | learn.microsoft.com |
CD conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about CD files.