I just made a class that can translate an Excel file into a list of C# objects. I am currently working on Xamarin.Android. All worked fine in debug mode, the file was opening correctly. But when I changed to release mode, it just crashes without any exception message, but only the stacktrace (that I don't understand :s)
I believe my permissions are correctly setup, I checked them in the application settings.
I tried with a Windows application, it works.
I tried to change the file's location, but nothing changed.
try
{
book = new XSSFWorkbook(filePath.GetStream());
}
catch (Exception e) // Exception without message
{
onResult(new SyncProductsSummary(false, 0, 0, e));
return;
}
filePath.GetStream works just fine, I get the actual file size, and I also tried NOT using this, but by giving the filePath as string, nothing changed.
Here's the stacktrace I get:
If the image doesn't work (I'm not sure how to use this): https://pasteboard.co/IgbV96W.jpg
If it is working in the debug configuration, but not the release configuration, it is likely due to the linker settings. Like Jason mentioned, your release configuration may be trying to "Link All" which would require linker configuration for use. Try using one of the other two settings.
MS Android Docs: https://learn.microsoft.com/en-us/xamarin/android/deploy-test/linker
MS iOS Docs: https://learn.microsoft.com/en-us/xamarin/ios/deploy-test/linker
If you are unfamiliar, you can find these settings in your project build settings.