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

GetRuntimeReader?

Last post 3/16/2007 6:42 PM by Eli Tayrien. 2 replies.
  • 3/15/2007 7:59 PM

    GetRuntimeReader?

    What is the exact string I'm supposed to put here? I thought I knew it, but when I run my program, it throws an exception saying it can't find the reader. Here's my code:


            public override string GetRuntimeReader(TargetPlatform targetPlatform)
            {
                return "X2DContentPipeline.CurveReader, X2DContentPipeline, Version=1.0.0.0, Culture=neutral";
            }

     

    X2DContentPipeline is the namespace. CurveReader is my ContentReader. Is this not how I'm supposed to do it?

  • 3/16/2007 5:10 AM In reply to

    Re: GetRuntimeReader?

    This string is the AssemblyQualifiedName of your reader type. You can actually get the type itself to supply that string with code like this:

    typeof(CurveReader).AssemblyQualifiedName

    Obviously that assumes that the CurveReader type is available to your writer type. If not you can still use that code as a quick test to double check that you have the right string.

    The makeup of the AssemblyQualifiedName is in the .Net docs.

    Cheers,
    Leaf.

  • 3/16/2007 6:42 PM In reply to

    Re: GetRuntimeReader?

    Also, it looks like CurveReader is in your content pipeline assembly, not the game assembly. That may not be the source of your problem, but it is best practices to put the reader in the game assembly itself.

     
    http://msdn2.microsoft.com/en-us/library/bb195590.aspx has more information. see in particular "Loading the Pixel Shader."

     

    hope this helps! 

     

    Eli Tayrien - XNA Framework Developer
Page 1 of 1 (3 items) Previous Next