Share via

Visual Studio class designer don't support records from C#

hoshik 35 Reputation points
2024-04-01T16:15:48.7333333+00:00

when I try to display record on the visual studio class diagram, I get an error
Also, the class diagram does not recognize the primary constructor in record as public properties
Error:

One or more selected elements cannot be added to the class diagram. Check the code for errors and note that you can only add types in the scope: — types specified in the project that contain this schema, — public types defined in the assembly referenced; — public types specified in a successfully created project that is referenced; — the types specified in the imported shared project;

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments
{count} votes

Answer accepted by question author
  1. Bruce (SqlWork.com) 83,661 Reputation points Volunteer Moderator
    2024-04-01T17:04:55.5733333+00:00

    you are correct, the class designer does not support records. see this thread for status:

    https://developercommunity.visualstudio.com/t/class-diagram-does-not-support-c-9-record-types/1291566

    3 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.