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;

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,865 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,133 questions
C#
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.
10,940 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 65,396 Reputation points
    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 Answers by the question author, which helps users to know the answer solved the author's problem.