c# - Xna Load Content. Cannot open file -


I was trying to load a spritefont from Content.load. But I'm getting the error that the file can not open.

  font1 = content. Load & lt; Sprint Font & gt; ("/ Sprite font 1");  

error

"\ SpriteFont1" can not open the error file loading.

I searched the Internet but I could not find anything. I've primarily imported a SprintFont in my content file.

I hope someone can help me, this will help me a lot.

! [Enter image details here] [1]

I think that Correct spelling xnb file for spriteFont (code inside xml file).

With this in mind, make sure that in your solution, the SprintFont 1 file is set as a "property" from the file property.

Also, make sure that this content is not within a folder in the project (rather than at the root level).

Finally, be sure to set the original source of content properly:

  Content.RootDirectory = "content";  

If you want to expand my answer, please post the code with which you load the font, and an image of the solution will also be useful.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -