I’m encountering an issue while generating an EAN13 barcode using Aspose.BarCode in .NET 8. On the first attempt, I experience over 500 internal exceptions, mainly ArgumentException types from Aspose.Drawing.Common, such as:
System.ArgumentException: 'Requested value 'Roman' was not found.'
These exceptions don’t crash the application but lead to long load times (13+ seconds) when Visual Studio is attached for debugging. I’ve attached a screenshot for reference.
Could you please advise on how to resolve this or if it’s a known issue?
I tested your scenario/case using your exact project on my pc (Windows11) but I could not find the issue. I just opened your project into VS.NET 2022, I used a valid license and updated the relevant lines of code for setting license file path accordingly. Then I executed the application and it just took less than 2 second to complete the process on my end. See the screenshot attached for your reference. sc_shot1.png (109.6 KB)
PS. I am using Aspose.BarCode v24.8 and Aspose.Drawing.Common 24.9.
I found the cause of the problem: I had ‘Enable Just My Code’ unchecked in Visual Studio (under Options > Debugging > General) while running the sample app. This caused exceptions internal to Aspose to be captured by the diagnostic tools.
Below is a screenshot of what I see in the Events tab when running TestConsole with ‘Just My Code’ unchecked.
You could try replicating my findings by disabling ‘Enable Just My Code’ in Visual Studio and running the test, just as a sanity check.
As a side note: these exceptions started appearing after version 23.1.0 of Aspose.BarCode (right around the time that System.Drawing was replaced by Aspose.Drawing if I am not mistaken).
I did uncheck the option as you proposed in VS.NET and then run the sample app. I am sorry but still I could not find the issue. It takes around 2 seconds to complete the process. See the screenshot (attached) for your reference. sc_shot1.png (156.5 KB)
Thank you for trying. There must be something else different in my environment causing the exceptions to show up. Fortunately, as mentioned before, my problem is solved when I check ‘Enable Just My Code’.
Yes, it might be due to your environment or other configuration on your end. Anyway, you may check the option if it works for your needs. Please feel free to write us back if you have further queries or comments.