Visual Studio Developer Center > Visual Studio Forums > Visual Studio Class Designer > ClassDiagramm creates classes not in the same folder
Ask a questionAsk a question
 

AnswerClassDiagramm creates classes not in the same folder

  • Friday, September 25, 2009 11:18 AMSergiu Dudnic Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello

    I created a project in VB.NET (MyProject1) inside I created a subfolder (MyDrawing1).
    In the MyDrawing1 folder I created a class diagram.
    So when designing (dragging) new classes on that diagram, the diagram creates my classes in the MyProject1 folder instead to create them in the same directory. :(

    I have the same named files in the main folder and there is a namespace problem too :( ... I think I don't like VB
    Best regards, Sergiu

Answers

  • Thursday, October 22, 2009 6:32 AMYang CaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi, Sergiu,

    Class Designer generate the code under root folder, not in the same folder where the diagram lives. I really want to blame others for this, but it is NOT VB's fault. It is just how Class Designer designed.

    And yes, Class Designer doesn't generate the internal private fields for you. Sorry about that.

    Regards,
    Yang

All Replies

  • Friday, September 25, 2009 4:22 PMkaymaf Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello

    I created a project in VB.NET (MyProject1) inside I created a subfolder (MyDrawing1).
    In the MuDrawing1 folder I created a class diagramm. So when designing (dragging) new classes on that diagramm, the diagramm creates my classes in the MyProject1 folder instead to create them in the same directory. :(

    I have the same named files in the main folder :(

    there is a namespace problem too :(

    I think I don't like VB
    Best regards, Sergiu

    There are other programming languages you can choose from if you dont like VB


    kaymaf
    I hope this helps, if that is what you want, just mark it as answer so that we can move on
  • Friday, September 25, 2009 4:24 PMSergiu Dudnic Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    :) thanks for your solution.

    Unfortunately my project imposes VB.NEt usage.

    Best regards, Sergiu
  • Monday, September 28, 2009 10:33 AMSergiu Dudnic Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    More that than.
    The diagram designer generates the classes and its properties, but didn't generate the internal private fields.

    So, for if I have 10 classes each of them with 10 members I have to insert the 100 private fields manually.

    This is not very comfortable, maybe better I write it by code?..
    Best regards, Sergiu
  • Thursday, October 22, 2009 6:32 AMYang CaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi, Sergiu,

    Class Designer generate the code under root folder, not in the same folder where the diagram lives. I really want to blame others for this, but it is NOT VB's fault. It is just how Class Designer designed.

    And yes, Class Designer doesn't generate the internal private fields for you. Sorry about that.

    Regards,
    Yang
  • Friday, October 23, 2009 11:36 AMSergiu Dudnic Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Class Designer generate the code under root folder, not in the same folder where the diagram lives. I really want to blame others for this, but it is NOT VB's fault. It is just how Class Designer designed.
    You have reason. I tested in C#, and yes, I blamed VB in vain.

    "Class Designer doesn't generate the internal private fields for you"

    When in C# I can just add the private fileld, and then Encapsulate it(refactoring), in VB i have no such a feature.

    Best regards, Sergiu