Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a game where I want to use ContentTypeReader. While loading my model like this:

terrain = Content.Load<Model>("Text/terrain");

I get following error:

Error loading "Text\terrain". Cannot find ContentTypeReader

I've read that this kind of error can be caused by space's in assembly name so i've already removed them all but exception still occurs.

This is my content class:

public class HeightMapInfoWriter : ContentTypeWriter<HeightmapInfo>
    protected override void Write(ContentWriter output, HeightmapInfo value)

        foreach (float height in value.getHeight)

    public override string GetRuntimeType(TargetPlatform targetPlatform)

    public override string GetRuntimeReader(TargetPlatform targetPlatform)

Does anyone meed that kind of error before?

share|improve this question
up vote 1 down vote accepted

I can't be sure from the description but is your content-type-reader class in your content-pipline-extensions project? If so than that is probably the reason why it can't find it. The content-type-reader has to be available at runtime and thus has to be part of the game project or of one of the linked game library projects. Be sure to update your assembly name when you move your class and also, just to be sure, add spaces after the commas in the string that desribes where the class should be.

Edit: to be sure you have to exact QualifiedAssemblyName of a class write this piece of code:

string info = typeof(HeightMapInfoReader).AssemblyQualifiedName;

Of course this only works for a class in the same, or a referenced, assembly so you still have to copy the string in info and put it in the ContentTypeWriter's GetRunTimeReader method harcoded but it makes sure you don't have typo's.

share|improve this answer
Yes it is in my ContentPipelineExtensionLibrary. Reference is added and so do spaces to string's but still doesn't work. Any other ideas? – user1889999 Dec 9 '12 at 22:15
Please read my answer again. The problem is that it is in the ContentPipelineExtensionsLibrary and that it should be in your Game project or a Game Library project :) – Roy T. Dec 10 '12 at 7:14
I'm writing this project with my friend and it worked for him. For some reason my project even with those changes can't be run but I assume that its not connected with this issue :) Thank you for your reply. Problem solved! – user1889999 Dec 11 '12 at 9:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.