I have been using Monogame for a few years now. I’m no expert coder but really enjoy coding when I get chance.
I have been working on a project that it drove by XML. I tried porting it to Linus on a Raspberry Pie but got problems (as I expected). The error looked to be reading an XML file. I quickly made a really basic project that opens a XML file and prints a word to the screen. Windows it’s fine, Linux I get the same error.
Unhandled exception. System.IO.FileNotFoundException: Could not find file ‘/home/pi/XML read test\start_up_new.xml’.
File name: ‘/home/pi/XML read test\start_up_new.xml’
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at LinuxPieTesting.Game1.Initialize() in C:\Users\johng\source\repos\LinuxPieTesting\LinuxPieTesting\Game1.cs:line 29
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at LinuxPieTesting.Program.Main() in C:\Users\johng\source\repos\LinuxPieTesting\LinuxPieTesting\Program.cs:line 11
I’m not quite sure where to start looking. At first, i thought it may be because there were spaces in the folder path names (had issues around this before) but no luck.
I’m assuming the System.IO dll must be there in the dotnet files as its thrown the error. I have had a google search and can’t find anything.
I’m using the latest version of Monogame 3.8 so really at a loss. I apologize in advance if this is a dumb question, i really thought it would work out of the box
I tried attaching the project but can’t seem to
Any help or a point in the right direction would be appreciated.