Object Test Bench

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A.M-SG

    Object Test Bench

    Hi,

    My solution consists of 20 c# projects. When I switch to class view and
    right click on any class, I don't have the create instance option.



    I am using visual studio 2005 professional edition. If I create a simple
    winform application, the create instance option in class view.



    Is there any reason why I don't have created instance option in bigger
    projects?



    Thank you,

    Alan


  • Yan-Hong Huang[MSFT]

    #2
    RE: Object Test Bench

    Hello Alan,

    Based on my understanding, the problem is that: Your solution has 20 C#
    projects. However, the IDE doesn't have the "create instance" menu item
    when you right click on any class in class view. Please correct me if I
    have misunderstood anything.

    I created a testing solution and 20 testing c# projects. However, it seems
    the option is working on my side. Could you please help test from a simple
    solution to see whether you can reproduce it on your side?

    If it is convenient for you, could you please email us a repro sample and
    so we will investigate it for you. Thanks very much.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C www.microsoft.com/security
    Register to Access MSDN Managed Newsgroups!
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Comment

    • A.M-SG

      #3
      Re: Object Test Bench

      Hi Yan,

      Do you know any condition for the project or solution that prevent the
      classes with project have the "create instance option" ?

      Thank you,
      Alan


      "Yan-Hong Huang[MSFT]" <yhhuang@online .microsoft.com> wrote in message
      news:Z2Py7ZwJGH A.3152@TK2MSFTN GXA02.phx.gbl.. .[color=blue]
      > Hello Alan,
      >
      > Based on my understanding, the problem is that: Your solution has 20 C#
      > projects. However, the IDE doesn't have the "create instance" menu item
      > when you right click on any class in class view. Please correct me if I
      > have misunderstood anything.
      >
      > I created a testing solution and 20 testing c# projects. However, it seems
      > the option is working on my side. Could you please help test from a simple
      > solution to see whether you can reproduce it on your side?
      >
      > If it is convenient for you, could you please email us a repro sample and
      > so we will investigate it for you. Thanks very much.
      >
      > Best regards,
      > Yanhong Huang
      > Microsoft Community Support
      >
      > Get Secure! ¨C www.microsoft.com/security
      > Register to Access MSDN Managed Newsgroups!
      > http://msdn.microsoft.com/subscripti...gednewsgroups/
      >
      > This posting is provided "AS IS" with no warranties, and confers no
      > rights.
      >[/color]


      Comment

      • A.M-SG

        #4
        Re: Object Test Bench

        Hi Yan,



        I think I found how to reproduce the problem; I appreciate if you could
        confirm it with Microsoft tem:



        Step 1) Use Visual Studio 2005 Professional Edition

        Step 2) Create a solution with one WinForms application within it



        At this point you have create instance option for all classes within the
        class view



        Step 3) Add a class library to the solution

        Step 4) Go to the class view and choose any class of the class library you
        just created

        Step 5) Right click on that class, there is no "Create Instance" option!





        This behavior seems to be by design, but I am wondering what is the
        microsoft official explanation for this limitation.



        Thank you,

        Alan



        "Yan-Hong Huang[MSFT]" <yhhuang@online .microsoft.com> wrote in message
        news:Z2Py7ZwJGH A.3152@TK2MSFTN GXA02.phx.gbl.. .[color=blue]
        > Hello Alan,
        >
        > Based on my understanding, the problem is that: Your solution has 20 C#
        > projects. However, the IDE doesn't have the "create instance" menu item
        > when you right click on any class in class view. Please correct me if I
        > have misunderstood anything.
        >
        > I created a testing solution and 20 testing c# projects. However, it seems
        > the option is working on my side. Could you please help test from a simple
        > solution to see whether you can reproduce it on your side?
        >
        > If it is convenient for you, could you please email us a repro sample and
        > so we will investigate it for you. Thanks very much.
        >
        > Best regards,
        > Yanhong Huang
        > Microsoft Community Support
        >
        > Get Secure! ¨C www.microsoft.com/security
        > Register to Access MSDN Managed Newsgroups!
        > http://msdn.microsoft.com/subscripti...gednewsgroups/
        >
        > This posting is provided "AS IS" with no warranties, and confers no
        > rights.
        >[/color]


        Comment

        • tdavisjr

          #5
          Re: Object Test Bench

          Oh. I ran into is issue. The solution was that in order to use the
          Object Test Bench, the current class you want to test must be within
          the current Active Project. So,

          1. Find your class
          2. Make the project that includes the class as the default active
          project
          3. You should see the option in the context menu in the class view

          Not sure about this one; but I also think your class must define a
          default contructor that takes no parameters. I hope everthing you are
          able to get it to work this way.

          Comment

          • A.M-SG

            #6
            Re: Object Test Bench

            Yep, that did the trick!

            You are the man!

            Thank you very much for help.

            Alan


            "tdavisjr" <tdavisjr@gmail .com> wrote in message
            news:1138807751 .503629.117290@ g14g2000cwa.goo glegroups.com.. .[color=blue]
            > Oh. I ran into is issue. The solution was that in order to use the
            > Object Test Bench, the current class you want to test must be within
            > the current Active Project. So,
            >
            > 1. Find your class
            > 2. Make the project that includes the class as the default active
            > project
            > 3. You should see the option in the context menu in the class view
            >
            > Not sure about this one; but I also think your class must define a
            > default contructor that takes no parameters. I hope everthing you are
            > able to get it to work this way.
            >[/color]


            Comment

            Working...