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

Adding assemblies to Visual Studio's assembly list.

Last post 9/4/2009 4:04 AM by Lost C1tY. 7 replies.
  • 9/3/2009 2:18 AM

    Adding assemblies to Visual Studio's assembly list.

    I'm in the process of writing an installer for an open source skeletal animation tool based on the Animation Component library.

    As part of the install process I would like to add the .dll files to the Add assembly list in VS, which is something that was fairly straightforward for windows projects;

    I added a new registry key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NET Framework\AssemblyFolders, which points to a directory containing the assemblies.

    Now when I select Add  Reference in VS, the assemblies show in the .NET section. However,  on an X360 project the list of available assemblies is greatly reduced, presumably because a large amount of .NET is unavailable on .NET CF. So I was wondering how I can add the X360 library .dll so that it will show up in the assembly list of an X360 project.

    Thanks,

    Lost C1tY
  • 9/3/2009 7:54 AM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    That method seems to be overkill. Why do you want your assemblies to be in a separate directory instead of with the game?
    Also, what's the point of writing an installer for an Xbox 360 game when you can't actually run an installer on a 360?

    Why not just use the Browse or Project sections?
  • 9/3/2009 12:09 PM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    To get it in the list, you should be able to use gacutil. It's a small command line app that installs assemblies into the global assembly cache (usually C:\windows\assembly). Once in there it *should* appear in your list.

    You should be able to find gacutil under C:\Windows\Microsoft.Net somewhere. To use it: gacutil /i <assemblyfile>

    PebbleDash - Released
    Abstacked - Released
  • 9/3/2009 2:35 PM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    MrLeebo:
    That method seems to be overkill. Why do you want your assemblies to be in a separate directory instead of with the game?
    Also, what's the point of writing an installer for an Xbox 360 game when you can't actually run an installer on a 360?


    It seems fairly common for developer tools to make their assemblies available in this manner, and I'm well aware it isn't possible to run an installer on X360, or write an installer for an X360 game. I'm not making a game.

    lutas:
    To get it in the list, you should be able to use gacutil.


    Thanks for the reply, I was aware of GACUtil.exe, however there's a number of issues regarding it's use. As it's a non-standard component, it's presence/location isn't guaranteed on the target machine, and according to the Windows Vista Logo Program guide "Gacutil must not be called from a custom action. Gacutil is not designed to be used during installation."

    My installer is WiX based, and as such it's possible to "cleanly" register a .dll to the GAC the dll registering functionality available to a .msi, but after some amount of experimentation I determined that simply registering an assembly to the GAC doesn't make it show up in the VS assembly list (at least not on my machine). Which is the reason I settled on adding new reg key in the NET Framework's AssemblyFolders key.

    In any case, I've already managed to get the .dlls to show up in the assembly list. The issue is why they aren't showing for an X360 project. If you notice, a large amount of .NET is missing, so it's not entirely unreasonable to assume that it's simply populating the list from a different location, or applying some filtering to the libraries added. Further information would be greatly appreciated.
    Lost C1tY
  • 9/3/2009 3:14 PM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    Just did a quick test with XNA 2.0. I don't have 3.0/3.1 installed on this machine but I'd imagine it's the same.

    The files in the browser appear to come from C:\Program Files\Microsoft XNA\XNA Game Studio\v2.0\References\Xbox360 (or equivalent). Copying the system.xml.dll and renaming seems to add the newly created reference to the 360 add reference .NET tab. Of course randomly inserting files in there is a bit dubious but not massively...
    PebbleDash - Released
    Abstacked - Released
  • 9/3/2009 8:43 PM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    lutas:
    To get it in the list, you should be able to use gacutil. It's a small command line app that installs assemblies into the global assembly cache (usually C:\windows\assembly). Once in there it *should* appear in your list.

    You should be able to find gacutil under C:\Windows\Microsoft.Net somewhere. To use it: gacutil /i <assemblyfile>


    This won't work. All this will do is put the assembly in the GAC, but the VS Add Reference dialog does NOT enumerate assemblies from the GAC. Registering the path is the correct way to solve this problem.
    Stephen Styrchak | XNA Game Studio Developer
  • 9/3/2009 8:49 PM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    Answer
    Reply Quote
    The correct key to use is this one:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\XNA\AssemblyFolders\v3.1\Xbox 360\AssemblyFoldersEx

    Please note the space in "Xbox 360"; it is significant.

    The proper way to register your assemblies is to create a new key under this one, and set the default value to the full path of your SDK folder. Any assemblies in that folder will appear in the Add Reference dialog.

    That folder is also where you want to place your intellisense help files (if any).

    If you also are creating custom templates for Xbox 360, be sure to read this section of the documentation:
    http://msdn.microsoft.com/en-us/library/dd282478.aspx
    Stephen Styrchak | XNA Game Studio Developer
  • 9/4/2009 4:04 AM In reply to

    Re: Adding assemblies to Visual Studio's assembly list.

    Stephen Styrchak:
    The correct key to use is this one:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\XNA\AssemblyFolders\v3.1\Xbox 360\AssemblyFoldersEx


    That did the trick, thanks mate.
    Lost C1tY
Page 1 of 1 (8 items) Previous Next