p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional Refactoring in Visual Basic ISBN: 978-0-470-17979-6 (http://p2p.wrox.com/book-professional-refactoring-visual-basic-isbn-978-0-470-17979-6-395/)
-   -   Output Type Class cannot be started (http://p2p.wrox.com/book-professional-refactoring-visual-basic-isbn-978-0-470-17979-6/77972-output-type-class-cannot-started.html)

KSumerford January 27th, 2010 06:33 PM

Output Type Class cannot be started
I'm on pages 76 through 79 in the Refactoring in VB book. The two NTests in VS2008 and
with ReSharper verson 4.5 installed failed. When I tried to debug these tests in VS 2008
it gave me the following error from VS 2008:

A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, add an executable project to this solution which
reference the library project. Set the executable project as the startup project.
How do I do that?

Most of my work during the last four years has been in Web development. So the
DLL's and associated classes are Not fresh in my memory.

-- Kenneth S.

Danijel January 30th, 2010 08:38 AM

Use NUnit GUI to run your tests
You should use NUnit GUI to execute your tests. See figure 3-10. You will have to download and install NUnit framework available at http://www.nunit.org. After that, you can navigate to NUnit in Start->Programs to run NUnit GUI. Follow the steps described on page 72 in Installing NUnit section.

Visual Studio 2008 does not support running NUnit tests, but VS 2010 should. (NUnit is a third party open source framework after all). I haven’t used ReSharper lately, but to my understanding, it is also capable of running NUnit tests. Also, note that BodyFatContent test will fail on purpose. I left it unimplemented so you could do it as an exercise. You need to implement BodyFatContent in FemalePatient class in order to have this test execute with success. Hope this helps…

KSumerford January 30th, 2010 05:15 PM

reply to NUnit not working
Thanks for the info. I tried it in the NUnit GUI and got this error:
There is no source Code available for the current location.

Then I tried again and got the reply that the test still failed. It seems to get the old DLL or
some other old code.

---- Kenneth

Danijel January 31st, 2010 09:08 AM

Open TestCaloriesCalculator.dll in NUnit GUI
1 Attachment(s)
The way to run NUnit GUI is to open the TestCaloriesCalculator.dll in File-> Open Project dialog in NUnit GUI. The TestCaloriesCalculator.dll is found inside the Debug directory of TestCaloriesCalculator project and it is reconstructed each time you rebuild the project. The exact route(relative to extracted source code location) is:

\179796 Ch03\179796 Ch03_AR Source\TestCaloriesCalculator\TestCaloriesCalculat or\bin\Debug\ TestCaloriesCalculator.dll

I have attached a screenshot of NUnit GUI after executing the tests.

KSumerford February 2nd, 2010 04:43 PM

more of the thread on Refactoring
Thanks for the info. Now I know which DLL and where to use it
in the NUnit GUI.

All times are GMT -4. The time now is 04:44 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.