F # and xna font issues

I decided to learn F # a while ago and make it a little more fun for myself. I want to use XNA. There is only one question that I seem to be unable to survive, and it is related to the content pipeline. Basically, I need a font to draw a string. To get a font, I need a content pipeline. But since I use F #, I cannot access the content pipeline at all. So how do I draw text?

Note. To run F # and XNA, I just added references to XNA assemblies in Visual Studio. I do not know if there is another way, I could not find it.

Take care kerr

+4
source share
1 answer

One of the special features in the XNA Game Project and Game Library Project templates is that they can store the “Content Reference” in the XNA “ Content Project ”. (Note that you will need XNA Game Studio.)

When you create a project [library], it will invoke the assembly of all the content projects that it refers to. The reason that content projects are not assembled independently of each other is that they can be created for different platforms (Xbox, Windows, etc.) And for different profiles (Reach, HiDef) - these parameters are indicated by link projects (of which there may be many).

An easy way to create content for a project type other than XNA-Game is to simply create an empty “Windows Game Library Project” (or depending on the platform you are targeting). Add a link to the content in this library. And then link to this library from your project.

Visual Studio is smart enough to copy content to the project's output directory when it copies an empty DLL.


Another option would be to use MSBuild.exe to directly compile the content project. You will need to specify the platform and profile yourself, for example:

 /property:XNAContentPipelineTargetPlatform=Windows;XNAContentPipelineTargetProfile=Reach 
+4
source

All Articles