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

Project installer - How to?

Last post 11/29/2008 1:34 AM by Aaron Stebner. 4 replies.
  • 11/27/2008 4:05 PM

    Project installer - How to?

    Hi all!

    I've just finished my C# project (Windows Form Applilcation). I can see in my project dependencies that the visual studio 2008 did not automatically detected the XNA dependency. This thing does not occurred with .Net framework 3.5.

    All the XNA refereces which I need in project are listed in my Project References.

    How can I build an installer which automatically detects the XNA dependencies?

    And so, I do not need to add all the libraries manually in the installer package.

    Here, it is the exception when I call a control which uses XNA libraries:
    See the end of this message for details on invoking  
    just-in-time (JIT) debugging instead of this dialog box. 
     
    ************** Exception Text ************** 
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d' or one of its dependencies. The system cannot find the file specified. 
    File name: 'Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d' 
       at Horus.Forms.Widgetbox.aircraftToolStripMenuItem_Click(Object sender, EventArgs e) 
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) 
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) 
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) 
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) 
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) 
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) 
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) 
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 
       at System.Windows.Forms.Control.WndProc(Message& m) 
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m) 
       at System.Windows.Forms.ToolStrip.WndProc(Message& m) 
       at System.Windows.Forms.MenuStrip.WndProc(Message& m) 
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 
     
    WRN: Assembly binding logging is turned OFF. 
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
    Note: There is some performance penalty associated with assembly bind failure logging. 
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 
     
     
     
    ************** Loaded Assemblies ************** 
    mscorlib 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) 
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll 
    ---------------------------------------- 
    Horus 
        Assembly Version: 0.0.0.26 
        Win32 Version: 0.0.0.26 
        CodeBase: file:///C:/Program%20Files/Embraer/Data%20Service/bin/Horus.exe 
    ---------------------------------------- 
    System.Windows.Forms 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
    ---------------------------------------- 
    System 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll 
    ---------------------------------------- 
    System.Drawing 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
    ---------------------------------------- 
    WeifenLuo.WinFormsUI.Docking 
        Assembly Version: 2.2.3107.21142 
        Win32 Version: 2.2.0.0 
        CodeBase: file:///C:/Program%20Files/Embraer/Data%20Service/bin/WeifenLuo.WinFormsUI.Docking.DLL 
    ---------------------------------------- 
    System.Xml 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll 
    ---------------------------------------- 
    WindowsBase 
        Assembly Version: 3.0.0.0 
        Win32 Version: 3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll 
    ---------------------------------------- 
    ExtendedRichTextBox 
        Assembly Version: 1.0.0.0 
        Win32 Version: 1.0.0.0 
        CodeBase: file:///C:/Program%20Files/Embraer/Data%20Service/bin/ExtendedRichTextBox.DLL 
    ---------------------------------------- 
     
    ************** JIT Debugging ************** 
    To enable just-in-time (JIT) debugging, the .config file for this 
    application or computer (machine.config) must have the 
    jitDebugging value set in the system.windows.forms section. 
    The application must also be compiled with debugging 
    enabled. 
     
    For example: 
     
    <configuration> 
        <system.windows.forms jitDebugging="true" /> 
    </configuration> 
     
    When JIT debugging is enabled, any unhandled exception 
    will be sent to the JIT debugger registered on the computer 
    rather than be handled by this dialog box. 



    Thank you in advance!
  • 11/27/2008 5:33 PM In reply to

    Re: Project installer - How to?

    What's the problem with just adding the DLL manually?
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 11/27/2008 5:56 PM In reply to

    Re: Project installer - How to?

    I would like to add that I read this:

    You do NOT need to install Visual C# Express or XNA Game Studio unless you require any of the following:

    • 2.0 games using GamerServices or Microsoft.Xna.Framework.Net.*
    • XnaPack utility to create and/or deploy .ccgame packages
    • Runtime usage of content pipeline creation components (such as in the WinForms samples)

    In this topic.

    I make a usage of content pipeline creation components... But it is impossible to me to tell to the users install the visual c# express.

    Does anyone have any suggestion, of what can I do? I also can modify my code. But I need to use the XNA in windows form application.

    Thank you in advance.

    Gustavo
  • 11/27/2008 5:57 PM In reply to

    Re: Project installer - How to?

    Now I am considering add the DLLs files manually. But, I need to know exactly what files I have to add.

    Thank you.
  • 11/29/2008 1:34 AM In reply to

    Re: Project installer - How to?

    You should not include XNA Framework assemblies in your game's installer directly.  This type of redistribution is not allowed by the XNA Game Studio license agreement, and it can cause side-by-side installation problems on systems that have XNA Game Studio already installed.

    You can create an installer for your game that will install the XNA Framework redistributable, and it should take care of the file not found exception you are currently encountering.  I'd suggest taking a look at the FAQ about creating installers (http://forums.xna.com/forums/t/1989.aspx) to see if the information and links in there help in this scenario.

    Also, you do not necessarily need the XNA Game Studio content pipeline assemblies at runtime for your game - it depends on how you are using the content pipeline.  You can find more information about this scenario in this post on Shawn Hargreaves' blog and this post on my blog.

    Thanks!
Page 1 of 1 (5 items) Previous Next