I wan’t to create a MonoGame Project but when I added MonoGame.Extended.Tiled to display and load my Tiled map, the content pipeline tool failed to build it
The instructions on their page is wrong.
You shouldn’t need to install the Content.Pipeline libraries in your main project. This will add ~50MB of tools and libraries to your published game that you don’t need. If you did add those references, remove them.
The correct way to do this, is to clone the git repo, build the libraries on your own, and finally copy them in your project under a new folder, lets say ‘/Libraries/Extended/’.
Then add a reference to the importers in your content.mgcb and references to the runtime libraries to your .csproj.
@Taqro11 Hello, recently I also came to the same error as you described. I tried to clone the MonoGame.Extended git repo and built it locally, I added references in content.mgcb:
and it worked, but when I’m trying to load map I’m getting an error:
Unhandled exception. System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.ReadString()
at MonoGame.Extended.Tiled.TiledMapReader.ReadProperties(ContentReader reader, TiledMapProperties properties)
at MonoGame.Extended.Tiled.TiledMapReader.ReadLayer(ContentReader reader, TiledMap map)
at MonoGame.Extended.Tiled.TiledMapReader.ReadGroup(ContentReader reader, TiledMap map)
at MonoGame.Extended.Tiled.TiledMapReader.ReadLayers(ContentReader reader, TiledMap map)
at MonoGame.Extended.Tiled.TiledMapReader.Read(ContentReader reader, TiledMap existingInstance)
at Microsoft.Xna.Framework.Content.ContentTypeReader`1.Read(ContentReader input, Object existingInstance)
at Microsoft.Xna.Framework.Content.ContentReader.InnerReadObject[T](T existingInstance)
at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[T]()
at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[T]()
at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)
at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
at test_project.Game1.LoadContent() in /Users/l3llff/Projects/game/test_project/Game1.cs:line 30
at test_project.Game1.Initialize() in /Users/l3llff/Projects/game/test_project/Game1.cs:line 25
at Microsoft.Xna.Framework.Game.DoInitialize()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Program.<Main>$(String[] args) in /Users/l3llff/Projects/game/test_project/Program.cs:line 3
I wonder if you faced this problem? Also can you tell how you added references to the runtime libraries to your .csproj? Thanks!