Closed renelaerke closed 1 month ago
Sorry should have seen this on my initial pull - but the initial Crash is not persisted correctly.
The code to File.Create(path) apparently does not release the file fast enough to make WriteAllText succeed.
File.Create(path)
WriteAllText
It thows the exception: "The process cannot access the file '/crashes.mauiinsights' because it is being used by another process."
I removed the check to File.Exists and File.Create as WriteAllText itself will create any missing file.
File.Exists
File.Create
I also implemented ResetCrashes() method to remove crashes from the file when they have been reported to AppInsights.
ResetCrashes()
Thank you for helping me to make the library better.
Sorry should have seen this on my initial pull - but the initial Crash is not persisted correctly.
The code to
File.Create(path)
apparently does not release the file fast enough to makeWriteAllText
succeed.It thows the exception: "The process cannot access the file '/crashes.mauiinsights' because it is being used by another process."
I removed the check to
File.Exists
andFile.Create
asWriteAllText
itself will create any missing file.I also implemented
ResetCrashes()
method to remove crashes from the file when they have been reported to AppInsights.