简体   繁体   中英

Joining Multiple Projects in one solution

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM