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
Microsoft.Xna.Framework.Content.ContentLoadException when loading fonts(Spritefont) - other content types seem to be fine #7174
Comments
Can you provide a sample project? |
Looking into it, found 2 bugs in your project setup:
I did however find an unrelated bug regarding font building from Mac. |
I'm still experiencing the same issue - even after applying the changes you pointed out :( Note: Im assuming you saw my commented out line in the Game1 class line 32 :O |
Oh, this might have something to do with compiling from Windows. |
(Also didn't mean to close this before, pressed the wrong button) |
Ahh cool no probs. PS - Im sure it gets said enough but you and the rest of the devs have done an awesome job! |
I am running into the same issue with the latest 3.8 dev nugets. Is there a solution for this? |
Are you also compiling iOS game from Windows? |
@harry-cpp No, I am compiling on Windows (DirectX). |
Can you give me a repro project? |
@harry-cpp will try and put something together to illustrate the problem... |
@harry-cpp I created a brand new project on windows and added a spritefont. Note, I deleted the packages folder since it was making the zip file too big (>700MB). Visual Studio will re-download the packages. If you need to manually add the nuget packages, just add the Monogame DirectX, Content Pipeline and content builder task nugets (I was using build 3.8.0.1403). The specific error it throws when trying to run is:
Compiling the spritefont doesn't have any issues. |
Okey, I think I see what the problem is! |
@harry-cpp I tried your build with the fixes (build 1405) and I now get the following error: D:/Dev/csharp/game/Test/fonts/arial.xml : error : Processor 'FontDescriptionProcessor' had unexpected failure! Do I need both changes from 1405 and 1406 for this to work correctly? |
I've only submitted a PR: #7199, build 1405 is the one that run for it.
Thats a content build failure, it has nothing to do with all of this, you are missing "vs c++ 2012 redist" stuff, tho I personally just quickly grabbed a newer freetype6 as even with "vs c++ 2012 redist" I couldn't get it to work. |
@harry-cpp I have the runtimes installed and don't have an issue compiling fonts on projects which use the standard monogame installer or when I was running build 1403. The only issue I had then was the font loading issue when trying to run. This problem only started occurring when trying build 1405 with the changes you submitted. I'll try re-installing my VC runtimes, but I don't think that's the issue. |
My changes do not touch content compilation. I know what I'm talking about. |
Seems like something got messed up on my laptop. I can't get past the freetype6 issue now. I have installed the VC runtimes (2012, 2013, 2015-2019) multiple times and it still doesn't fix it. I may have to re-install VS to see if that solves it. |
You can just grab a newer version of the lib from: https://github.com/Robmaister/SharpFont.Dependencies/blob/f8b032e132b7319099c916b78ec131866997f643/freetype2/2.6/msvc12/x64/freetype6.dll and replace the one found in packages/.nuget/.dotnet folders, and it will work. |
@harry-cpp I replaced the dll in all the * .monogame. * packages within the project (that have the dll) and that fixes that problem. Also, build 1405 with your fix resolves the font loading issue at runtime. Thanks for fixing this! |
Is there anywhere I can grab the I cant find it in the artefacts on the Team City server but facing the same issue. I am assuming the android builds happen somewhere else? Edit: Seems Android and iOS are currently skipped in the CI build.
|
Full exception Details:
Microsoft.Xna.Framework.Content.ContentLoadException:
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.ListReader 1[[System.Char, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] (Microsoft.Xna.Framework.Content.ListReader 1[[System.Char, System.Private.CoreLib]])
Platform details****Versions: 3.8.0.1375-develop
OS: Windows
MonoGame platform: Both Android and iOS
The text was updated successfully, but these errors were encountered: