How to get Visual Studio 2008 Object Test Bench to work?

1.8k views Asked by At

I'd like to use the Object Test Bench in VS2008. The docs - and even the helpful text in the test bench window - say to right click on class in the Class View. Further reading indicates that this class must be in the startup project or referenced assembly. I've tried this on numerous classes - public, private, static, you name it - in several assemblies (either the startup project or a referenced project), and the context menu item "Create Instance" never appears.

Has anyone had any luck with this? Is this a bug, or am I doing something wrong?

3

There are 3 answers

0
Jon B On BEST ANSWER

Solved it!

I had multiple projects set to run on startup (I've gotten so used to working that way I didn't even realize there was a difference!).

Setting just one startup project fixed the problem.

3
tvanfosson On

I can only get it to work in the start up project if the project is a console or windows forms application. It doesn't seem to work with web sites.

BTW. I don't ever use it in practice. And after playing with awhile in the context of trying to figure out why it wasn't working for you, I now know why! Very difficult to do something that ought to be simple on a fully working project.

0
Kris Erickson On

I know that you couldn't get it to work in VS2005 without installing Visual J++, but that obviously isn't the problem as you are using VS2008. Are you sure you are looking in the Class View and not looking at the classes in the Solution View (I know that sounds stupid, but that was the problem I had getting working the first time I tried to use it).