Free Support Forum - aspose.com

Unable to set provided font as default (Parameter 'defaultFontName') in Note 20.7.0

After updating from Aspose.Note 20.5.0 to 20.7.0 i now intermittently get

System.TypeInitializationException
The type initializer for '  ' threw an exception.
   at Aspose.Note.Page..ctor(Document document)
   at   .   ​  ()
   at   .   ​  ()
   at ​ .()
   at ​ .   ​  ()
   at   .(Stream , Document , LoadOptions )
   at Aspose.Note.Document.(Stream , LoadOptions )
   at Aspose.Note.Document..ctor(Stream inStream, LoadOptions loadOptions)
   at Aspose.Note.Document..ctor(Stream inStream)
   at HtmlConvert.FromOneNote(Stream input) in C:\Code\DocumentConverter\src\DocumentConverter
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in 

System.ArgumentException
Unable to set provided font as default (Parameter 'defaultFontName')
   at Aspose.Note.Fonts.FontsSubsystem.(String , Dictionary`2 )
   at Aspose.Note.Fonts.FontsSubsystem..ctor(Stream defaultFont, Dictionary`2 fontsSubstitutions)
   at   ..ctor(Stream )
   at   ..ctor()
   at   ..cctor()

It only seems to be when i run it in parallel with other tests that use Aspose

@simoncropp,

Could you please create a separate (simple) console demo application (runnable), zip the project and provide us to reproduce the issue, we will check it soon. Also, attach one note document(s) if any.

I cant because it is intermittent

@simoncropp,
You may share a sample project as suggested above. We will try to reproduce the scenario by running it multiple times here as without reproducing the issue, it is not possible to provide appropriate assistance.