I'm new to the Monogame content pipeline tool, as opposed to XNA which would do the compiling you need on itself. So I may be having a pretty simple problem I fail to see a solution for. Here's my XML file:
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:ns="Microsoft.Xna.Framework">
<Asset Type="Game1.Screens.SplashScreen">
<SplashScreen>
<Path>Images/Image1</Path>
</SplashScreen>
</Asset>
</XnaContent>
So I'm not entirely sure as of what <Asset Type="...">
wants as a value, but the debugger tells me there's an error there:
Could not resolve type 'Game1.Screens.SplashScreen'.
So it's a simple tutorial I was watching:
There the person decided to teach on how to use XML serialization. So he was using XNA but most of this code should work on Monogame as well. Anyway, what he did was, add a new XML file to a folder, outside of the Content.RootDiretory
and added his XML file in there. Since I've never released a project with Monogame yet, so correct me if I am wrong, but won't that XML file that's set to Copy always to output directory
be user-viewable/editable? Or will it be compressed into XNB? Or perhaps it won't be even presented there? So that is the problem's root, now let's see the top:
Being unable to answer to myself whether the XML file will actually be presented in the final product's Content directory, I decided to use the Content pipeline tool and add the above XML file from there as I was sure that it would be converted into XNB. But now I get this error. And I don't know where am I wrong? Should I set the file's build action from the default Build
to Copy
the error disappears, but the XML file will be in my Content directory instead of the XNB one. Please advice.
Here's some more information about the SplashScreen
class:
It inherits from another class, GameScreen
.
It is inside the Screens
, folder inside the project's folder. That's why I tried to use Game1.Screens.SplashScreen
, where Game1
is the name of my project.
Thanks in advance!