Hello,
I am encountering an exception after upgrading to Aspose.Words.NET v22.3.0 (from v21.10.0)
Unhandled exception. System.InvalidOperationException: An error has been encountered while evaluating the expression or statement ‘data.Contains("")]>’. Common Language Runtime detected an invalid program.
—> System.InvalidProgramException: Common Language Runtime detected an invalid program.
at _6641e7047f4f43e1ab08ce78b88e83d4. ( , Object , Object , Object )
at .( , , [] )
at ()
at ()
— End of inner exception stack trace —
at ()
at .()
at .()
at . ( , , IDictionary , )
at .( , IDictionary , )
at . ( , , IDictionary , )
at .( , IDictionary , )
at . ( , , IDictionary , )
at .( , IDictionary , )
at . ( )
at . ( , )
at .(String[] , Object[] , , , , )
at .(String[] , Object[] , , )
at Aspose.Words.Reporting.ReportingEngine.BuildReport(Document document, Object[] dataSources, String[] dataSourceNames)
at Aspose.Words.Reporting.ReportingEngine.BuildReport(Document document, Object dataSource, String dataSourceName)
at Aspose.Words.Reporting.ReportingEngine.BuildReport(Document document, Object dataSource)
at Program.$(String[] args) in C:\Workspace\Data\Temp\AsposeTest\Program.cs:line 7
I have attached a sample of this exception:
AsposeTest.zip (660 Bytes)
run with dotnet run
using Aspose.Words;
using Aspose.Words.Reporting;
var doc = new Document();
new DocumentBuilder(doc).Writeln("<<foreach [data in Values]>><<if [data.Contains(\"\")]>><</if>><</foreach>>");
new ReportingEngine().BuildReport(doc, new Data());
public class Data
{
public string[] Values { get; set; } = new[] { "" };
}
Can you confirm this is a bug with this version of Aspose.Word? Version 21.10 seems to work OK.
thanks.