- Home /
Errors in .exe after build (maybe caused by not correct reading xml files)
Hi, today I wanted build my project and everything seems to not work! Only few script are working. (In editor playmode everything works perfectly) When I build project with developer build and console there are a lot of null refrence exeptions.
So I opened "output_log.txt" and here I have many: http://pastebin.com/5g1bYej8
But after few lines I have this:
IsolatedStorageException: Could not find a part of the path "G:\testInz\Nowy folder\Dark Time_Data\Resources\Text Files\Inventory\Consumable\DATA_Items.xml". at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001f9] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs:290
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in :0
at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x00082] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs:69
at Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString) [0x00053] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/System.XML/System.Xml/XmlTextReader.cs:193
at Mono.Xml2.XmlTextReader..ctor (System.String url, System.Xml.XmlNameTable nt) [0x00044] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/System.XML/System.Xml/XmlTextReader.cs:115
at System.Xml.XmlTextReader..ctor (System.String url, System.Xml.XmlNameTable nt) [0x00006] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/System.XML/System.Xml/XmlTextReader2.cs:107
at System.Xml.XmlDocument.Load (System.String filename) [0x00002] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/System.XML/System.Xml/XmlDocument.cs:697
at ItemsXMLReader..ctor (System.String path) [0x00011] in C:\Inzynier\CDV-Slavic-Survival-Game\Slavic Survival RPG Game\Assets\GameScripts\UI\TextReaders\ItemsXMLReader.cs:22
at Assets.GameScripts.GameItems..ctor () [0x00048] in C:\Inzynier\CDV-Slavic-Survival-Game\Slavic Survival RPG Game\Assets\GameScripts\GameItems.cs:28
at GameController.Awake () [0x00058] in C:\Inzynier\CDV-Slavic-Survival-Game\Slavic Survival RPG Game\Assets\GameScripts\GameController.cs:117
(Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs Line: 290)
And after this there is avalanche of errors which probably are caused by not working xml rading (when path is correct in editor there is avalanche of null references too)
I created my xml reading classes based on this example: http://forum.unity3d.com/threads/add-multiple-language-support-to-your-unity-projects.206271/
So I using Path.Combine function to get xml files, maybe I should use something else to make it work in build? My .xml files are in "Assets/Resources/Xml Files/" Folder
Thanks.