Content Pipeline Extension Library annoyances

Last post 05-09-2008, 7:06 PM by Stephen Styrchak. 6 replies.
Sort Posts: Previous Next
  •  12-16-2007, 2:03 AM

    Content Pipeline Extension Library annoyances

    I was hoping a CPEL project would allow me to easily debug my custom Content Pipeline extensions. To use the debugger in 1.0  during custom content building, you had to explicitly launch the debugger from within the code by calling System.Diagnostics.Debugger.Launch(). If an exception was thrown and left unhandled, instead of launching the debugger, all you would get is a build error and stack trace in the output. This exact same problem remains with CPEL projects. This is very annoying for developing complex custom pipeline extensions. And as far as I can tell, you can still write custom content pipeline extensions in a Windows Game Library or Xbox 360 Game Library project, reference it in your game project, and you can custom build and load content just fine.

    So what exactly are the advantages to using the Content Pipeline Extension Library project and will the debugger problems be fixed in a future release?



    Working on an XNA world-building tool, TerraSuite
  •  12-16-2007, 4:54 AM

    Re: Content Pipeline Extension Library annoyances

    The Content Pipeline Extension Library template provides a project that is configured to conveniently build Content Pipeline Extensions. It wasn't intended to solve any issues related to debugging.

    The Content Pipeline Extension Library is intended to help people get started in extending the XNA Framework Content Pipeline. In addition, it contains configuration settings that allow it to be referenced from a content project targeting either Windows or Xbox 360, without any further customization of project dependencies or solution configurations. In XNA Game Studio Express 1.0, it was not at all intuitive to set up the project dependencies and solution configuration settings for Xbox 360 development. Now it is.

    Finally, this template helps people choose the right kind of project for Content Pipeline extensions. A game library is not the right kind of project. Xbox 360 game libraries won't always work, even for people who manage to add the appropriate references in the first place. In addition, game libraries have nested content projects, which are never useful when you're building something that is intended to be used to build content. Game library projects also have features for cross-platform development that don't make sense for Content Pipeline extensions, since the extension is always executed on the Windows PC, and never deployed to an Xbox 360 console.

    If you have VS 2005 (as opposed to VC# 2005 Express), then you can follow the instructions here to learn how to more easily debug your content build. You'll need to scroll down to the section at the bottom of the page.

     

     


    Stephen Styrchak | XNA Game Studio Developer
  •  12-16-2007, 3:42 PM

    Re: Content Pipeline Extension Library annoyances

    Thanks Stephen!



    Working on an XNA world-building tool, TerraSuite
  •  01-25-2008, 5:21 AM

    Re: Content Pipeline Extension Library annoyances

    After thinking about this a bit more, I decided to dust off my abandoned Spaces site and post a couple articles explaining the Content Pipeline debugging story in detail. It'll be pretty dry reading for most people, but I just finished off the series by uploading a template that lets you debug the Content Pipeline from the IDE (either VS or VCSExpress).

    Here's a link to skip directly to the exciting conclusion!

    http://badcorporatelogo.spaces.live.com/blog/cns!43EB71B104A2D711!169.entry

     


    Stephen Styrchak | XNA Game Studio Developer
  •  01-25-2008, 4:14 PM

    Re: Content Pipeline Extension Library annoyances

    Another option might be to use something similar to the WinFormsContentLoadingSample to debug your custom processor. This also has the advantage of allowing a more interactive approach to debugging your custom content processor.

    David

  •  05-08-2008, 9:11 AM

    Re: Content Pipeline Extension Library annoyances

    dblack:

    Another option might be to use something similar to the WinFormsContentLoadingSample to debug your custom processor. This also has the advantage of allowing a more interactive approach to debugging your custom content processor.

    David



    Can you go further into detail ? How can we use our custom processor inside that sample ?

    I cannot use the other methods to debug because I have some strange errors... In case you understand what the compiler is saying...

    'msbuild.exe' (Managé) : 'E:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Engine\2.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Engine.dll' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Framework\2.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\fr\MSBuild.resources.dll' chargé, aucun symbole chargé.
    'msbuild.exe' (Managé) : 'E:\WINDOWS\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll' chargé, aucun symbole chargé.
    Une exception de première chance de type 'Microsoft.Build.CommandLine.CommandLineSwitchException' s'est produite dans msbuild.exe
    Le programme '[3556] msbuild.exe: Managé' s'est arrêté avec le code 1 (0x1).

    Boo
  •  05-09-2008, 7:06 PM

    Re: Content Pipeline Extension Library annoyances

    ungala:

    Can you go further into detail ? How can we use our custom processor inside that sample ?

    I cannot use the other methods to debug because I have some strange errors... In case you understand what the compiler is saying...

    [...]

    Une exception de première chance de type 'Microsoft.Build.CommandLine.CommandLineSwitchException' s'est produite dans msbuild.exe
    Le programme '[3556] msbuild.exe: Managé' s'est arrêté avec le code 1 (0x1).

    That isn't compiler output - it is debugger output. It says you passed an invalid option to the msbuild command line. You should set your debugger to break on exceptions so you can examine the callstack and see what part of your program is invoking msbuild here. That will make it a lot more clear what you need to fix.

    Go to Tools->Options and turn off the "just my code" debugging option, and then go to the Debug->Exceptions... dialog to configure the debugger to break when exceptions are thrown. When the debugger breaks, press Continue until you get to the point in your program where the CommandLineSwitchException is thrown.

     


    Stephen Styrchak | XNA Game Studio Developer
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback