问题
I run VS2010 Pro on a Windows XP machine. I have downloaded and installed PEX & Moles. That all went fine. When I open a C#-project and position the cursor on a class method and rightclick, I see no 'run pex' or 'pex' choice, as should be the case according to (install) docu.
As far as I could see I have done all by the book, but no joy. It seems I forget something somewhere but what? Who can help me out?
回答1:
I have noticed the same functionality when I added a reference to Pex to my project. When I removed it and right clicked the method body, then I could see "Run Pex" and "Pex."
I believe, and someone correct me if I am wrong, that you only need to reference the Microsoft.Pex.Framework in your Test project, not the project you are testing.
回答2:
I had the same problem. I closed visual studio and opened it again. Voila, it's there.
So, I think the issue is when the Pex was installed, my VS2010 project was open. It can't detect it after Pex was installed. If you close the project and open it again, the option shows up.
来源:https://stackoverflow.com/questions/6928798/run-pex-does-not-appear-on-rightclick