1

So I've very recently started trying to program a game with a friend of mine. I found some well made tutorials on FNA and I've been using that and everything's worked great so far, except this one thing. I cannot for the life of me figure out how to compile a .spritefont file into an .xnb file.

With a lot of searching I managed to find a spritefont template, and I even found a program (XNA 4.0 Content Compiler) that's supposed to do exactly what I need, but when I add the spritefont I want and say build it gives an error I wasn't able to find answers for online. This feels like something that should be a way simpler task than it's being right now and would appreciate any help.

The error the compiler program throws:

at XNAContentCompiler.ContentCompilerForm.b__8_0() in D:\Data\OneDrive\Game Developing\XNA 4.0 Content Compiler\XNAContentCompiler\ContentCompilerForm.cs:line 110
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at XNAContentCompiler.ContentCompilerForm.d__8.MoveNext() in D:\Data\OneDrive\Game Developing\XNA 4.0 Content Compiler\XNAContentCompiler\ContentCompilerForm.cs:line 110

  • Compiling a font to .xnb is something Visual Studio should handle on it's own when compiling, similair to how it converts uploaded images to .xnb – Steven Aug 26 '21 at 11:21

1 Answers1

0

You did not specify the output directory! It's located at Project Settings > Output Directory.

Becks723
  • 13
  • 1
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 01 '22 at 16:22