Game Development Community

Copy of" feature for xml txscene file

by Will O-Reagan · in Torque X 3D · 05/21/2007 (2:07 pm) · 4 replies

I have been having trouble with xml files not copying into the debug folder. Is there any way to enable the copy of feature? or is this the problem I'm having? heres the error I get, if i don't manually copy the xml file into the debug folder. (note, I wouldn't be complaining if I didn't have to manually copy some of the files every time. For some reason, its copying the some xml files, but not others, and I want to know why?)

now = System.Environment.TickCount;
            XmlDocument d = new XmlDocument();
            d.Load(levelFile);  // will's comment// this is where it will crash if i don't manually copy
            _Info("Took " + (System.Environment.TickCount - now) + " ms to load xml");

#if DEBUG
            _Validate(d);
#endif

            now = System.Environment.TickCount;

            // get root element
            XmlElement root = d.DocumentElement;

            // copyOf feature was disabled for 1.0 because we don't have time to get support for it into the editor.
            // and because it would require a lot of testing to make sure it actually works with sufficiently varied 
            *this is the comment that worrys me, and makes me think theres something 
            *that can be done about this error
inputs.

About the author

I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.


#1
05/22/2007 (1:34 pm)
That comment refers to the copyOf attribute of xml elements.
#2
05/22/2007 (6:06 pm)
Is that though why my C# wont copy all the xml files to the bin\data\levels folder when building?
#3
05/23/2007 (2:26 am)
You need to set the 'Copy To Output Directory' property on your XML files (In Visual Studio Express), it defaults to 'Do Not Copy' you probably want 'Copy If Newer'