Local C# Class Cannot be Added to Class Diagram


  • Hi,

    I'm using Visual Studio 2015 for an Umbraco CMS website.

    I have a very simple public ViewModel class. 

    I have created a class diagram file in the same folder of the project, but when I drag my VM class on it, an error message box says "one or more of the selected items cannot be added to the class diagram".

    It's really strange, it's a local file, in the same folder, it's public, etc.

    Can anyone please tell me what am I doing wrong?



    Monday, September 19, 2016 1:19 PM


  • Hi maroonedsia2,

    In my side, I could drag all classes to the class diagram without any problems from class view. Please refer to the following screenshot.

    According to your description, does the VM class call other references? Please refer to the following steps to troubleshot this issue:

    1). Please create a new project, and add a class diagram and some classes to it. To observe whether has the same issue, this method could help us exclude the reasons caused by Visual Studio.

    2). Please create a new simple class to your project, and drag it to class diagram to observe whether has the same issue. Which could help us to judge whether this issue caused by VM class.

    3). Please make sure all required assemblies from VM class are referenced.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, September 20, 2016 3:17 AM