Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TileMapReader Could not find ContentTypeReader #955

Open
frits191 opened this issue Oct 10, 2024 · 5 comments
Open

TileMapReader Could not find ContentTypeReader #955

frits191 opened this issue Oct 10, 2024 · 5 comments

Comments

@frits191
Copy link

frits191 commented Oct 10, 2024

Originally posted by @frits191 in #816 (comment)

Heya! I'm currently experiencing this exact problem with 4.0.3, OnLoad I get the could not find content type warning.
should I copy just the TiledMapReader class? Or rather the whole tiled folder? Not really sure what the answer of the original one meant. Any help would be greatly appreciated!

The error:
Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: MonoGame.Extended.Tiled.TiledMapReader, MonoGame.Extended.Tiled (MonoGame.Extended.Tiled.TiledMapReader, MonoGame.Extended.Tiled)'

What is failing:
_tiledMap = this.Content.Load<TiledMap>("TileMaps/Grass");

@frits191 frits191 changed the title Sorry for re-opening, but currently experiencing this exact problem with 4.0.3. TileMapReader Could not find ContentTypeReader Oct 10, 2024
@frits191
Copy link
Author

If it helps, I originally started this project on 3.8 and then upgraded to 4 by removing the plugins and then installing the new ones via nuget

@AristurtleDev
Copy link
Collaborator

@frits191 catching up on some issues, are you still experiencing this problem?

@kevld
Copy link

kevld commented Nov 11, 2024

Hi, I encountered the same issue, I'll try to investigate tomorrow
Meanwhile, here is a zip containing my tmx map if it helps (taken from a github repo)
I tried with the included map DebugScene
Maps.zip

@kevld
Copy link

kevld commented Nov 11, 2024

Ok, I have more data, hope it helps !

I work on mac and windows. On mac the issue is not present
On windows the issue is present.

BUT, on windows, if I target Windows as OS, and use MonoGame.Framework.WindowsDX as nuget instead of the OpenGL one, I don't have any issue

I'll try when i'll have time on simple project to see if the issue comes from Monogame.Extended or juste Monogame

Also it maybe is a beginner error, I'm pretty new with MonoGame

@nkast
Copy link
Contributor

nkast commented Nov 12, 2024

Since the libraries were merged together into a single library, there isn't a MonoGame.Extended.Tiled dll anymore.
The reader sould be in MonoGame.Extended.dll.

The xnb should had the following typereader
MonoGame.Extended.Tiled.TiledMapReader, MonoGame.Extended

I checked the Writer, because I originally had the typereader hardcoded as a literal, and it is now updated to return a typeof(reader), which should work.

Maybe you are using old .xnb. make sure you clean the project. Delete the \bin\ and \obj\ folder inside your \Content\ to be sure.

Or maybe you are using the old importer. Check inside .mgcb and see where the \reference: for MGE pipeline is pointing to. Verify that the dll is the latest version.

You can inspect the .xnb by opening it in a hex editor or notepad. It's binary, but the type readers are readable text at the begining. You have to disable compression in the .mgcb to be able to read them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants