471,306 Members | 1,276 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

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
Feb 1 '06 #1
5 2163
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.

Feb 1 '06 #2
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]" <yh*****@online.microsoft.com> wrote in message
news:Z2**************@TK2MSFTNGXA02.phx.gbl...
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.

Feb 1 '06 #3
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]" <yh*****@online.microsoft.com> wrote in message
news:Z2**************@TK2MSFTNGXA02.phx.gbl...
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.

Feb 1 '06 #4
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.

Feb 1 '06 #5
Yep, that did the trick!

You are the man!

Thank you very much for help.

Alan
"tdavisjr" <td******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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.

Feb 1 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jan Decaluwe | last post: by
16 posts views Thread by Duncan Lissett | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.