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/ite开发者_JAVA技巧ms 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.
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.
精彩评论