.CD

CD File

Visual Studio Class Diagram
Ask a question
QUICK ANSWER

A .cd file is a Visual Studio Class Diagram file. It stores the visual layout of your project's classes as XML and opens in Visual Studio (Windows) by double-clicking it in Solution Explorer. It contains no executable code and is safe to open; deleting one removes only the diagram view, not any source code.

Developer: Microsoft Corporation Category: Developer Files MIME: application/xml
OPENS ON Windows
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jul 15, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

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: LOW

A .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
FULL NAMEVisual Studio Class Diagramaka Class Diagram file, VS Class Designer file
DEVELOPERMicrosoft Corporationsince 2003 (Visual Studio .NET 2003, Class Designer add-in); built-in since VS 2005
MIME TYPEapplication/xml
TYPEXML-based class diagram descriptor (text)
This extension is also used by…
  • 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

Windows2 apps
Microsoft Visual Studio Freemium Double-click the .cd file in Solution Explorer to open the Class Diagram canvas. If it opens as XML, repair the Class Designer via Visual Studio Installer > Modify > Individual components.
Notepad / any text editor Open-source Open as XML text to inspect diagram layout data; useful for debugging or minor edits (e.g. repositioning a class by changing X/Y values).

Technical details

deep spec
Format typeXML-based class diagram descriptor (plain text)
Root element`<ClassDiagram MajorVersion="1" MinorVersion="1">` identifies the file
Schema versionMajorVersion=1, MinorVersion=1 (current; unchanged since Visual Studio 2005)
Content storedVisual 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 encodingUTF-8
Typical file size2 KB - 200 KB, scaling with the number of classes on the diagram
MIME type`application/xml`
Paradigm requirementRequires object-oriented source code (C#, VB.NET, or C++/CLI projects in Visual Studio)
Platform restrictionWindows only - Class Designer is not available in Visual Studio Code
Deletion behaviorDeleting a `.cd` file removes only the diagram view; underlying source files are unaffected
UML conventionsDiagram uses UML symbols for inheritance, association, and composition between classes
Released2003 (Visual Studio .NET 2003, Class Designer add-in); built-in since VS 2005
Latest versionVisual Studio 2022 (current; format schema largely unchanged since VS 2005)
Specificationlearn.microsoft.com

CD conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CD files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about CD files.

Frequently asked questions

What is a .cd file in Visual Studio?
A class diagram file generated by Visual Studio's Class Designer. It is XML that stores the visual layout of your project's classes - positions, sizes, which compartments are shown. The actual code stays in .cs/.vb files.
Can I delete a .cd file without losing code?
Yes. Deleting a .cd file removes only the diagram view - it does not delete any source code. The underlying classes are unaffected.
Why does my .cd file open as XML in Visual Studio 2022?
Known bug in some VS 2022 builds: the Class Designer component becomes unregistered. Fix: open Visual Studio Installer > Modify your installation > Individual components > search 'Class Designer' > ensure it is checked and repair.
Can I open a .cd file without Visual Studio?
Only as XML text (any text editor). There is no free standalone Class Designer renderer; the graphical view requires Visual Studio on Windows.
What does a .cd file contain?
XML nodes describing which classes appear in the diagram and their layout (position, size, which compartments are expanded). It does not duplicate source code - it only stores how the diagram looks.

References

1Microsoft Learn - Design and view classes with Class Designer (VS 2022)learn.microsoft.com
2fileformat.com - CD Visual Studio Class Diagram Filedocs.fileformat.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.NOMEDIAAndroid No-Media Marker File
7.BINCD/DVD Disc Image (BIN/CUE)
8.RPMSGRestricted Permission Message
9.MDMarkdown Document
10.XDWDocuWorks Document

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z