在一个解决方案中加入多个项目
我已经开始创建一个游戏,并且添加了第二个项目,它是标准的 XNA Windows 游戏 3.1 项目,并且由于另一个项目已经有一个 Main 来启动程序,第二个项目用于游戏数据,而第一个项目用于事物的绘图和图形方面(菜单等)我以为我会删除 Main 方法,现在我得到的只是错误说没有有效的 main 方法,我试图使其依赖于其他方法(因为此数据在运行时加载,例如任务/物品等),但它仍然不允许我运行解决方案。主要方法的代码仍在第一个项目中,如果我删除第二个项目,它运行正常,尽管没有游戏数据,所以我只得到菜单... 预先感谢您提供的任何帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您创建新项目时,它应该询问您想要什么类型的项目。如果该项目只是包含要从另一个项目运行的代码/数据,而不是本身可运行,那么您应该选择“类库”项目。
我不能说我自己做过任何 XNA 工作,但我认为它以正常方式支持类库。
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.