Note that there are some explanatory texts on larger screens.

plurals
  1. POInvalidOperationsException during XML-Serialization in XNA
    primarykey
    data
    text
    <p>I have a question concerning an Error I experience while trying to read an XML-File through the XNA 4.0 Content Pipeline in order to build Objects. First I reused old XNA 3.1 Code of mine which worked back in the day but now throws the an Error Message:</p> <p>Building content threw InvalidOperationException: Instanzen von abstrakten Klassen können nicht erstellt werden. (Unable to build Instances of abstract Classes - roughly translated) at ReflectionEmitUtils() ...and goes on forever, I can post it, if it's needed, but for better readability of my initial request..</p> <p>Then I used this <a href="http://msdn.microsoft.com/en-us/library/ff604979" rel="nofollow">Method</a> but it throws the same error.</p> <p>These are the relevant pieces of source code: I've written a class to define the content/structure of the XML-File:</p> <pre><code>public class Command { public List&lt;bool&gt; mButtons; public List&lt;Keys&gt; keys; public Enum iD; } </code></pre> <p>And this is my XML File, with which I want to build Command-Objects</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;XnaContent&gt; &lt;Asset Type="KinectRTS_Input.Command"&gt; &lt;mButtons&gt;true/mButtons&gt; &lt;keys&gt; &lt;Item&gt;LeftControl/Item&gt; &lt;/keys&gt; &lt;iD&gt;SMulti/iD&gt; &lt;/Asset&gt; &lt;/XnaContent&gt; </code></pre> <p>(In my code, the Brackets are all correct, though since this Form processes XML-Tags...;)) I used a <a href="http://blogs.msdn.com/b/shawnhar/archive/2008/08/12/teaching-a-man-to-fish.aspx" rel="nofollow">Test-Application</a> in order to find out, which Format the XNA-Serializer uses to output List-Items and enums, so I'm reasonably sure, that there's not the error.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload