XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

.dll File Names

Last post 9/27/2009 7:15 PM by Nick Gravelyn. 2 replies.
  • 9/27/2009 6:57 PM

    .dll File Names

    I'm trying to figure out how to build my project into different .dll files according to namespace.  For example, XNA has Microsoft.Xna.Framework, Microsoft.Xna.Framework.Media, etc...  I already have my files organized into Engine, Engine.Math, and so on.  How can I build them into different .dll's according to their namespace?

    Thanks in advance.
  • 9/27/2009 7:04 PM In reply to
    • (2332)
    • premium membership MVP
    • Posts 1,221

    Re: .dll File Names

    For each DLL you want, you'll have to create a new XNA Game Library project in your solution.  Then each one of these projects will create a DLL as their output.

    However I would suggest that you carefully consider whether each project is necessary.  Creating more projects will add additional complexity, so it's generally not something you want to do unless it makes sense.
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
  • 9/27/2009 7:15 PM In reply to

    Re: .dll File Names

    It's worth noting that the XNA framework only has (not counting the content pipeline DLLs) two DLLs: the main framework and one for the Game class and related classes. They don't have a separate DLL for each namespace.

    I went through a phase where I too wanted lots of DLLs for whatever reason. What I quickly learned is that it becomes hard to do that without running into these problems:
    1. My DLLs all wound up relying on functionality from the other ones. So what's the point of splitting them up if each requires the others?
    2. I generally wanted to use the functionality from all of them in a game which just meant more work to add a lot of references.
    3. It's kind of annoying to have a ton of projects.

    In the end I just went back to building my entire framework into a single DLL. It's compact, simple, and makes sense. Unless you have good reason to split up multiple DLLs, I highly recommend not doing so.

Page 1 of 1 (3 items) Previous Next