c# - My created executable file will not run because it can't find the XML-files -
I am working on a large project, and today I tried to make it executable with Microsoft Visual Studio 2010. Worked, but the program will be closed while attempting to run it, This is probably because my work "public listing load" can not get a project sheet because it is making the same compilation. My XML is in C: \ test4 \ myLevels \ and my exe is in my C: \ test folder I put my levelus folder with XML files in C: \ test4 \ folder. Sorry for my poor english Any help is welcome!
Error (in Dutch, this does not change in English):
woutr \ AppData \ Local \ Temp \ WER9F14.tmp.WERInternalMetadata.xml : \ Users \ woutr \ AppData \ Local \ Temp \ WERD03.tmp.aspcompat.txt C: \ user \ woutr \ AppData \ Local \ Temp \ WERD81.tmp.mdmp Lease Day Online Privacy: go.microsoft.com/fwlink/ ? Linkid = 104288 & amp; clcid = 0x0413 Als de onlineprivacyverklaring niet beschikbaar, and offline offline privarcling: c: \ windows \ system32 \ nlro-nl \ erofflps txt
photo of what an error looks like : Imgur.com/77iAOGe
XML class:
public class XML { Arwajnik Save zero (catalog & lt; Sprite & gt; sprites, int levelnumber) {XmlSerializer serializer = new XmlSerializer (Type (List & lt; Sprite & gt;)); CreateDirectory ("myLevels"); (Serializer.Serialize (textWriter, sprites);}} Public listing & lt; sprite & gt; load (using TextWriter textWriter = new streamer (@ "my levels \ level" "+ LevelLumber +" .xml "))) {XmlSerializer deserializer = New XML Surveiller (Typef (List & Lt; Sprite & gt;)); (TextReader textReader = New Stream Reader (@ "Milewell's Level" "+ Level Domain +" .xml ")) Experiment (list & lt; Sprite & gt; Sprites = (list & lt; Sprite & gt;) deserializer. Direialial (text reader); Return sprites;}} Private Zero C ReateDirectory {string}} {directory.Exists (path)} {DirectoryInfo dir = Directory.CreateDirectory (path);}} }