locked
Invalid token 'Text' at root level of document errors on non xml documents in project

    Question

  • I have a file whose name does not end in config or xml, which is marked as "Content" and gets copied to the output directory. When I compile, I get the error "Invalid token 'Text' at root level of document" and "XML document must contain a root level element"

    Any idea as to why VS thinks my file is supposed to be XML? Are all "Content" files treated as XML?
    Thursday, January 31, 2008 5:01 PM

Answers

  • No content files aren't treated as XML.  Graphics files and source files can be marked as content so the actual format is irrelevant.  VS just copies the file over (if needed).  What extension does your file have?  What type of file is it?  Do you happen to have a custom tool mapped to it (file -> properties)?

     

    Michael Taylor - 2/1/08

    http://p3net.mvps.org

     

    Friday, February 01, 2008 2:06 PM