views:

76

answers:

1

I have started creating a game, and I added a second project, it's the standard XNA Windows game 3.1 project, and since the other project already had a Main to start the program and the 2nd is for game data, where as the first was for the drawing and graphical side of things (menu's etc) I thought I would remove the Main method, and now all I get are Errors saying there isn't a Valid main method, I tried to make it dependant on the other (since this data is loaded at run time and is such as quests/items etc) but it still wont let me run the solution at all. the code for the main method is still in the 1st project, and if I delete the 2nd project it runs fine, although no game data so I only get menus... Thank you in advance for any assistance.

+3  A: 

When you create a new project, it should ask you what type of project you want. If the project is just meant to contain code/data to be run from another project, rather than being runnable itself, you should choose a "Class Library" project.

I can't say I've done any XNA work myself, but I assume it supports class libraries in the normal way.

Jon Skeet
This Worked, Thanks, I looked at the logo in a different project (I downloaded some code to take a look since it's my first xna project) but they wer the same logo, but on creation it has a different image, coz I thought of this myself but didn't try because of the different Logo. Oh well. Lesson Learnt.
PCAddict
For what it's worth: XNA provides it's own version of "Class Library" called "Game Library". There's a Windows version and an XBox 360 version.
Bob