none
Using Team Build and Build Definitions with XNA Projects

    Question

  • I've spent a lot of the evening playing around and tweaking some build definitions to automatically build my XNA projects on Check-In.  All of that seems to working fine, the Build definition runs and it begins to go through the build process.  I had a couple of hiccups along the way but I am now at the stage where the actual game/game library projects build and the content projects build.  At least to a certain extent.  I appear to have hit a brick wall with any actual content.

     

    What it has come down to is the the building of the XNA content (i.e. converting say an image to .xnb file format) doesn't work and throws a build error.  I must add that this error does not occur at all if I do a build from within Visual Studio with my local copy of the code.  It is only with Team Build.  Here is an excert from the build log, specifically the error causing the problem.

    <fieldset>

    CoreCompile:
      Building xboxControllerSpriteFont.tga -> C:\Builds\2\Framework\Windows Framework Development Build\Binaries\Content\xboxControllerSpriteFont.xnb
      Rebuilding because asset is new
      Importing xboxControllerSpriteFont.tga with Microsoft.Xna.Framework.Content.Pipeline.TextureImporter
    Content\xboxControllerSpriteFont.tga : error : Building content threw InvalidOperationException: D3DERR_INVALIDCALL [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.CommonHelperFunctions.InitD3D() [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.InitD3D() [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild() [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :    at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings) [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Content\xboxControllerSpriteFont.tga : error :     Inner exception: COMException: Exception from HRESULT: 0x8876086C [C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj]
    Done Building Project "C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Content\Content.contentproj" (default targets) -- FAILED.
    Done Building Project "C:\Builds\2\Framework\Windows Framework Development Build\Sources\WorkingFolder\Framework\Development\Framework\Framework.Interface\Windows.Framework.Interface.csproj" (default targets) -- FAILED.

    Build FAILED.

    </fieldset>

    I have highlighted in bold the key error(s) from the build action.  I've tried search the web for these specific error messages and anty sort of help about using TFS with XNA.  I am unclear if this is a problem with XNA (3.1) only being compaitable with VS2008 when I'm using TFS2010.

    If anyone has any idea on a possible reason and (hopefully) solution it would be much appreciated.  If anyone knows also if this doesn't occur with TFS2008, I would be most greatful to know.  I apologies if this post should be in the XNA forums only and not hear, but any help would be greatly appreciated.  I will also post this on the XNA community forums.

    Friday, August 13, 2010 9:36 PM

Answers

  • Ok after some playing around and I finally found the solution.

     

    All I had to do from this point was set the build service to be an interactive service rather than a windows service and set the account to one that has access to all relevant files and tfs.  For my personal example I just used my account I log onto to windows with as my TFS installation is on that, but I imagine if you had a dedicated server, you would need all of the XNA required files installed on your dedicated build machine and then have an account that has access to those for the build service.

     

    One drawback I see is that because its an interactive process, there is a small console window that has to be open while the service is running, rather  than it running in the background, but this is a minor inconvenience.

     

    Thanks for suggestions and hopefully this will provide answers for anyone else who has this problem.

    • Marked as answer by a.goss2326 Wednesday, August 25, 2010 8:28 PM
    Wednesday, August 25, 2010 8:27 PM

All replies

  •  Hi a.goss2326,

    Could you connect to TFS 2010 from VS2008?

    I think XNA 3.1 is supported by VS2008, not supported by VS2010.

    VS2010 is compatible well with TFS2010. If you use VS2008 with TFS 2010, you need to install

    Microsoft Visual Studio 2008 Service Pack 1

    and Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010

    Hope it helps!

    Best Regards,

    Cathy Kong

    Tuesday, August 17, 2010 2:57 AM
  • Hi a.goss2326,

    Is your issue solved?

    I am changing the issue type to "Mark As Answer" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Unmark As Answer" by clicking the option at the bellow of the post window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and use by other community members having similar questions.

    Best Regards,

    Cathy Kong.

    Friday, August 20, 2010 9:37 AM
  • Hi,

     

    Apologies for the late reply.  To answer, yes I could connect fine to TFS from VS2008.  You are correct that XNA 3.1 is not supported in 2010 but is in 2008.  That does not seem to be the major issue.  I did get build definitions to start building when checking in but its from there I ran into problems.  First I encounted a problem with it building the XNA content projects which I managed to solve.  You can see a similar post to how I resolved it here .

     

    That is the point I am now stuck at.  It would appear that TFS has a problem with a D3DERR_INVALIDCALL error being returned when trying to compile the content in an XNA content project.  I've been trying to get this work with both XNA and TFS installed on the same machine.  Visual studio has no problems, it is only if TFS tries to do an automated build.  Perhaps I am missing a setting somewhere (though I could not find anything from searching the web).  Or perhaps It just isn't compaitable with TFS 2010 as XNA3.1 isn't compaitable with VS2010.

    Thanks for the suggestions anyway but I have already been through those steps.  If there is no response  or other suggestions from anyone then I shall reluctantlyh try it with TFS 2008.  If that doesn't work then I guess I will do without.

     

    Edit: Here is my thread on the xna forums too

    Tuesday, August 24, 2010 7:27 PM
  • Ok, from the XNA community forum thread I posted, I was shown another thread which came to the following post:

    Here are the fixes I’ve done in my build process so far:

     

    1)       My build definition only includes the game project now, and not the solution (since the solution will build the content project as well, which isn’t needed since the game project builds the content project already).

    2)       When editing the build definition, do the following:

    a.        Edit the build definition

    b.       Choose the Process tab on the left side

    c.        Expand the 3. Advanced node of the build process parameters

    d.       Change MSBuild Platform to X86 .

     

    That is now building the app. Hooray! However, I’m now running into a new problem. I’m getting exceptions from “Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild”.

    After a little work, I found out that the content pipeline requires a D3D device, which unfortunately is unavailable as a service with no desktop connection.

    I hope it shows up at a future date for AAA-style game building!

    Thanks again,

    I had gotten to the point were I changed the MSBuild Platform to x86 and that did allow me to build the content projects.  However, as you can see we both come accross the D3D problem.  One reply to my XNA thread suggested:

    The developer on that thread was trying to build from a service process that didn't have an interactive login session on the PC.  I can't tell for sure from your problem description whether that is the same configuration that you're trying to build with as well, but I am guessing so based on the call stack you posted.  If so, that type of build scenario isn't supported by XNA Game Studio currently.

    So I was now wondering would this be a setting that can be configured within TFS or not?

     

    Thanks again for any help.

     

    Edit: forgot to add the links to the other threads, they are in my previous posts, but just for confirmation:

    My thread

    Similar problem thread

    Tuesday, August 24, 2010 8:29 PM
  • Ok after some playing around and I finally found the solution.

     

    All I had to do from this point was set the build service to be an interactive service rather than a windows service and set the account to one that has access to all relevant files and tfs.  For my personal example I just used my account I log onto to windows with as my TFS installation is on that, but I imagine if you had a dedicated server, you would need all of the XNA required files installed on your dedicated build machine and then have an account that has access to those for the build service.

     

    One drawback I see is that because its an interactive process, there is a small console window that has to be open while the service is running, rather  than it running in the background, but this is a minor inconvenience.

     

    Thanks for suggestions and hopefully this will provide answers for anyone else who has this problem.

    • Marked as answer by a.goss2326 Wednesday, August 25, 2010 8:28 PM
    Wednesday, August 25, 2010 8:27 PM
  • Hi a.goss2326,

    Thanks for sharing the solution, which will be help to other community members having the similar question!

    Best Regards,

    Cathy Kong

     

    Thursday, August 26, 2010 8:28 AM