Open deepgoyal25 opened 4 years ago
Below is the stacktrace of the exception I am getting when using File.WriteAllText on Mono project in Mac: -
System.EntryPointNotFoundException: CreateFile assembly: type: member:(null) at at (wrapper managed-to-native) Pri.LongPath.NativeMethods.CreateFile(string,Pri.LongPath.NativeMethods/EFileAccess,uint,intptr,uint,uint,intptr) at Pri.LongPath.File.GetFileHandle (System.String normalizedPath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.IO.FileOptions options) [0x00010] in <949b8fd35a4a4e66861d647602656384>:0 at Pri.LongPath.File.Open (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00011] in <949b8fd35a4a4e66861d647602656384>:0 at Pri.LongPath.File.CreateStreamWriter (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00008] in <949b8fd35a4a4e66861d647602656384>:0 at Pri.LongPath.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <949b8fd35a4a4e66861d647602656384>:0 at Pri.LongPath.File.WriteAllText (System.String path, System.String contents) [0x00007] in <949b8fd35a4a4e66861d647602656384>:0
Can you please suggest a possible workaround or the possible fix
Versions I am using: -
Mono 6.6.0.166 Xamarin.Mac - 6.10.0.21 .Net framework - 4.6.2
Below is the stacktrace of the exception I am getting when using File.WriteAllText on Mono project in Mac: -
System.EntryPointNotFoundException: CreateFile assembly: type: member:(null)
at at (wrapper managed-to-native) Pri.LongPath.NativeMethods.CreateFile(string,Pri.LongPath.NativeMethods/EFileAccess,uint,intptr,uint,uint,intptr)
at Pri.LongPath.File.GetFileHandle (System.String normalizedPath, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.IO.FileOptions options) [0x00010] in <949b8fd35a4a4e66861d647602656384>:0
at Pri.LongPath.File.Open (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00011] in <949b8fd35a4a4e66861d647602656384>:0
at Pri.LongPath.File.CreateStreamWriter (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00008] in <949b8fd35a4a4e66861d647602656384>:0
at Pri.LongPath.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <949b8fd35a4a4e66861d647602656384>:0
at Pri.LongPath.File.WriteAllText (System.String path, System.String contents) [0x00007] in <949b8fd35a4a4e66861d647602656384>:0
Can you please suggest a possible workaround or the possible fix