RonenNess / GeonBit.UI

UI system for MonoGame projects.
MIT License
466 stars 63 forks source link

Could not find ContentTypeReader Type #144

Closed fr0 closed 3 months ago

fr0 commented 3 months ago

I upgraded from 4.1.0.1 to latest (4.3.0.4) and how Initialize is throwing this error:

Microsoft.Xna.Framework.Content.ContentLoadException
  HResult=0x80131500
  Message=Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: Microsoft.Xna.Framework.Content.ReflectiveReader`1[[GeonBit.UI.DataTypes.CursorTextureData, GeonBit.UI.DataTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] (Microsoft.Xna.Framework.Content.ReflectiveReader`1[[GeonBit.UI.DataTypes.CursorTextureData, GeonBit.UI.DataTypes]])
  Source=MonoGame.Framework
  StackTrace:
   at Microsoft.Xna.Framework.Content.ContentTypeReaderManager.LoadAssetReaders(ContentReader reader)
   at Microsoft.Xna.Framework.Content.ContentReader.InitializeTypeReaders()
   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 GeonBit.UI.Resources.LoadXml[T](String name)
   at GeonBit.UI.Resources.LoadXmlCursorData(String name)
   at GeonBit.UI.Resources.LoadContent(ContentManager content, String theme)
   at GeonBit.UI.UserInterface.Initialize(ContentManager contentManager, String theme)
   at GeonBit.UI.UserInterface.Initialize(ContentManager contentManager, BuiltinThemes theme)

I am a bit confused because I thought that the DataTypes assembly was removed, so I'm not sure where the error is coming from.

fr0 commented 3 months ago

Looks like I needed to update my content project as well. Got it sorted.