Wrox Programmer Forums
|
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2011, 11:11 AM
Authorized User
 
Join Date: May 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Message

Hello,

This may or may not be a Visual Studio 2010 problem, but I've completed the Chapter 10 Card project which has two projects for in the Solution Explorer, Ch10CardClient(start up project), and the Ch10CardLib project. When I run this project it gives me the error 'A project with an Output Type of Class Library cannot be started directly' and to set the project which is the executable as a start up project, which I have it's in bold, and is set as the start up project, right-click etc. Any one know how to get this project to work?

Thanks

Paul
 
Old July 20th, 2011, 03:51 PM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

Hello Paul,
you've set the CardClient as startup project? Is the project the correct project type? Check the properties of the project, open the Application tab. There you find the Output Type. If it is a "Class Library", it cannot be started.
If it is a class library you can either create a new project of type Console Application, or change the Output Type setting to "Console Application". Then you need to add a Main method as well.

Hope this helps.
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
 
Old July 21st, 2011, 11:49 AM
Authorized User
 
Join Date: May 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Christian,

That has been sorted now, thanks but there's a new problem now! I'm on Chapter 13 I've ran the program Ch13CardLib and this error message occurs 'inconsistent accessibility: property type 'Ch13CardClient.Cards' is less accessible than property 'Ch13CardClient.Player.PlayHand'

How do I fix this error?

Thanks

Paul
 
Old July 21st, 2011, 12:33 PM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

Hello Paul,

I assume the property PlayHand of type is public, the Cards type is internal. You need to make the Cards type public as well:
Code:
public class Cards
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
ERROR MESSAGE underbuchha Visual C++ 2005 0 September 30th, 2006 02:50 AM
HELP WITH ERROR MESSAGE AnnieT Classic ASP Databases 1 December 22nd, 2004 12:08 AM
error message help Dai Beginning PHP 1 July 1st, 2003 12:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.