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

winform series 2

Last post 4/4/2009 5:44 PM by Demian. 11 replies.
  • 3/21/2008 9:55 AM

    winform series 2

    i have my content processor it has strongname and it is put on the gac

    i can referance normal and build all my mesh

    but when i use the winform series 2 sample and add my content processor

    a little code

    const string xnaVersion = ", Version=2.0.0.0, PublicKeyToken=6d5c3888ef60e27d";

    const string Version = ", Version=1.0.0.0, PublicKeyToken=3fa99cd4ef88043a";

    static string[] pipelineAssemblies =

    {

    "Microsoft.Xna.Framework.Content.Pipeline.FBXImporter" + xnaVersion,

    "Microsoft.Xna.Framework.Content.Pipeline.XImporter" + xnaVersion,

    "Microsoft.Xna.Framework.Content.Pipeline.TextureImporter" + xnaVersion,

    "Microsoft.Xna.Framework.Content.Pipeline.EffectImporter" + xnaVersion,

    "EvoFx.SkyObject.Content.Pipeline" + Version,

    };

    it get loadet ok and when it has to process the model

    i get this error

    cannot find content processor : EvoFx SkyDome Processor

    AND ANOTHER ?

    IN THE MAIN FORM

    contentBuilder.Add(fileName, "Model", null, "ModelProcessor");

    and i have tryed this

     contentBuilder.Add(fileName, "Model", null, " EvoFx SkyDome Processor");

    this doesent work

    then i tryed this

    contentBuilder.Add(fileName, "Autodesk FBX - XNA Framework", null, " EvoFx SkyDome Processor");

    then i get the error

    cannot find content importer : Autodesk FBX - XNA Framework

    then i reverse the xna fbx importer it says

    [ContentImporter(".fbx", 
    CacheImportedData=true, 
    DisplayName="Autodesk FBX - XNA Framework", 
    DefaultProcessor="ModelProcessor")]
    is that why you referance to the ModelProcessor insted of the name Autodesk FBX - XNA Framework
    why can you not set 
    
     

    contentBuilder.Add(fileName, "Autodesk FBX - XNA Framework", null, "your name content processor");

    this will not work

     

    contentBuilder.Add(fileName, "Autodesk FBX - XNA Framework", null, "ModelProcessor");

    this will not work ider

     

    why

    the only thing i whant is to add a custrom processor

     

     

     

     

     

    follow the dev. on youtube channel

    The legend of the old spice , name rank and number soldier ... Join the Xna Developer Group at youtube , the place where you can show off your creations
  • 3/22/2008 3:29 PM In reply to

    Re: winform series 2

    Processors are referred to in the MSBuild project by class name, not the friendly UI name.

    To see how your project should be set up, just create a content project that does what you want using the VS UI, then examine the resulting XML to see what needs to go into your programmatically generated project.

    btw. you probably don't want to strong-name or GAC your processor assembly in this scenario. That only really makes sense if you are distributing code for other people to install. It's much easier to iterate on local projects if you keep them out of the GAC, and just provide an absolute path pointing to your assembly DLL (again, look at how VS sets this up when you reference a custom processor assembly).

    XNA Framework Developer - blog - homepage
  • 3/22/2008 4:11 PM In reply to

    Re: winform series 2

    tanks shawn i have been spending 2 dayes now and i coud get to work

    but when a just put in the class name of my processor

    SkyDome :  class name

    i just works

    do you have any ider how to referance by frendly name

    [ContentProcessor(DisplayName = "EvoFxSkydomeProcessor")]

     

    tanks alot

    you are the best

     

    follow the dev. on youtube channel

    The legend of the old spice , name rank and number soldier ... Join the Xna Developer Group at youtube , the place where you can show off your creations
  • 3/22/2008 6:44 PM In reply to

    Re: winform series 2

    The MSBuild project specifies processors by their class name. You cannot use the friendly name string here: that is just for UI display purposes inside Visual Studio, and has no meaning to the build system.
    XNA Framework Developer - blog - homepage
  • 3/23/2008 5:04 AM In reply to

    Re: winform series 2

    tanks for the info

     

     

    follow the dev. on youtube channel

    The legend of the old spice , name rank and number soldier ... Join the Xna Developer Group at youtube , the place where you can show off your creations
  • 1/6/2009 4:45 AM In reply to

    Re: winform series 2

    I'm still struggling to get this to work with a custom model importer.

    namespace MyNamespace 
        public class MyImporter : ContentImporter<MeshContent> 
        { 
           //... 
        } 

    Looking at typical Content xml I see something like:

        <Reference Include="MyImporter, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
          <SpecificVersion>False</SpecificVersion>
          <HintPath>..\..\..\..\..\bin\x86\Debug\MyImporter.dll</HintPath>
        </Reference>

    So I'm assuming I would need to do something like:
    BuildItem item = msBuildProject.AddNewItem("Reference""MyImporter, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"); 
    item.SetMetadata("SpecificVersion""false"); 
    item.SetMetadata("HintPath""C:\\MyImporter\\bin\\x86\\Debug\\MyImporter.dll");
     

    But I still get the error: Cannot find importer 'MyImporter'.

    Actually the only way i've got it to even pick up my importer code is to do:
    msBuildProject.AddNewImport("C:\\MyImporter\\MyImporter.csproj", null);

    But even then it doesn't find all the source files and fails to compile.. Also this is for use at runtime, so I need to use the DLL.

    Any ideas? Am I missing something obvious here?

    thanks
    /Steve
  • 1/6/2009 5:52 PM In reply to

    Re: winform series 2

    You don't normally need the SpecificVersion and HintPath stuff: just setting the Reference is enough. You're using a .NET strong assembly name here: have you tried just setting the reference to the absolute path to your DLL instead?
    XNA Framework Developer - blog - homepage
  • 1/7/2009 4:30 AM In reply to

    Re: winform series 2

    Yes I tried that too:

    msBuildProject.AddNewItem("Reference""C:\\MyImporter\\bin\\x86\\Debug\\MyImporter.dll");

    and still reports cannot find importer.

    Strangely I also tried
    msBuildProject.AddNewItem("Reference""C:\\Doesnt-exist\\Garbage.dll");

    and didnt get any errors. I would have expected something to say it couldnt find a DLL?
  • 1/7/2009 4:44 AM In reply to

    Re: winform series 2

    OK, I think its fixed now. I think this was just an error pointing to the wrong path for the DLL.

    Still, I'm surprised you dont get an error from the build system when you reference something that doesnt exist?
  • 1/12/2009 2:08 AM In reply to

    Re: winform series 2

    rousseauhk:
    Still, I'm surprised you dont get an error from the build system when you reference something that doesnt exist?


    Is it possible that the compiler is removing it at compile time? I'm not sure if it will include it if it is not used anywhere in your project.
  • 1/12/2009 4:06 AM In reply to

    Re: winform series 2

    Verminaard:
    rousseauhk:
    Still, I'm surprised you dont get an error from the build system when you reference something that doesnt exist?


    Is it possible that the compiler is removing it at compile time? I'm not sure if it will include it if it is not used anywhere in your project.


    It's also possible that MSBuild is giving another type of message for this. The ContentBuilder only reports error events via ErrorLogger and ignores all other types of events (eg warnings).
  • 4/4/2009 5:44 PM In reply to

    Re: winform series 2

    EvoFx Studio:

    tanks shawn i have been spending 2 dayes now and i coud get to work

    but when a just put in the class name of my processor

    SkyDome :  class name

    i just works

    do you have any ider how to referance by frendly name

    [ContentProcessor(DisplayName = "EvoFxSkydomeProcessor")]

     

    tanks alot

    you are the best



    Hi EvoFx Studio,
    could you specify how you got it to work?
    I also have a custo processor that i need to use.
     I tried adding an absolute path to the dll to both static string[] pipelineAssemblies and in  public void Add(string filename, string name, string importer, string processor) as well as suing the project name of the processor to no avail.

    The processor in question is the one in the skinnedModelSample by the way.

    Any thoughts?
Page 1 of 1 (12 items) Previous Next