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

Custom Content Build Directory XNA

Last post 11/26/2009 1:41 PM by Yaw Jatah. 3 replies.
  • 11/16/2009 1:50 AM

    Custom Content Build Directory XNA

    I am working on a Content Builder based off the WintFormsContentLoading sample from Creator's Club.

    My builder is building the .xnb files fine, but I can't get them to go in the right directory.

    In the project I specify the directory as follows.

    msBuildProject = new Project(msBuildEngine); 
     
    msBuildProject.FullFileName = projectPath; 
     
    msBuildProject.SetProperty("XnaPlatform""Windows"); 
    msBuildProject.SetProperty("XnaFrameworkVersion""v3.1"); 
    msBuildProject.SetProperty("Configuration""Release"); 
    msBuildProject.SetProperty("OutputPath", outputPath); 
    Where outputPath = "C:\\temp"

    It creates the directory "C:\\temp" just fine but then it tacks on "content" to the end, building the files to the "C:\\temp\content" directory.

    At no point do I instruct it to do this and when I write the outputPath to the console after the build it still reads "C:\\temp".

    I could change my ContentManager to look for the files here, but I am trying to implement a certain directory structure and would rather not do that.

    I've been all over google and the forums and have no idea what could be causing this.

    Any help would be greatly appreciated as this is holding up the progress of my class' project.

    Thank you.

     
  • 11/16/2009 5:12 PM In reply to

    Re: Custom Content Build Directory XNA

    I believe the Content subfolder comes from some logic in the ContentPipeline.targets which is included by the MSBuild project generated in our sample. There should be some properties to customize this, but I don't know exactly what they are. If this really matters to you, you could look at the ContentPipeline.targets to see exactly how it works.
    XNA Framework Developer - blog - homepage
  • 11/17/2009 2:48 AM In reply to

    Re: Custom Content Build Directory XNA

    Thanks Shawn that was the trick!
  • 11/26/2009 1:41 PM In reply to

    Re: Custom Content Build Directory XNA

    Hi B Fatz,
    I have been trying to figure out the same thing as you are . If you don't mind, can you kindly share what you had to get rid of the content folder being created.
Page 1 of 1 (4 items) Previous Next