[Bug] FastReport.WPF 2026.2.3 - Code tab in WpfDesignerControl throws TargetInvocationException due

Hi Fast Reports team,

I encountered an issue with the Code tab in the WPF Report Designer.

Environment

  • FastReport.WPF: 2026.2.3
  • .NET: net10.0-windows
  • Platform: x64
  • Windows: 11

The designer opens normally, the report can be edited in the Design tab, and Preview works correctly.

However, clicking the Code tab immediately throws an exception.

Exception

The outer exception is:

System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation.

The stack trace begins with:

FastReport.Design.PageDesigners.Code.SyntaxEditorClass.CreateInstance()
FastReport.Design.PageDesigners.Code.CodePageDesigner.CreateEditor()
FastReport.Design.PageDesigners.Code.CodePageDesigner.get_Editor()
...

The actual InnerException is:

Could not load file or assembly
'ICSharpCode.AvalonEdit,
Version=6.1.3.50,
Culture=neutral,
PublicKeyToken=9cc39be672370310'.

The system cannot find the file specified.


Root Cause

The ICSharpCode.AvalonEdit.dll assembly is not copied to the application's output folder.

The FastReport.WPF NuGet package also does not declare AvalonEdit as a dependency, so NuGet does not restore it automatically.

As a result, the Code Editor cannot be created.

Solution / Workaround

Installing AvalonEdit manually fixes the problem.

<PackageReference Include="AvalonEdit" Version="6.1.3.50" />

After rebuilding, ICSharpCode.AvalonEdit.dll is copied to the output folder and the Code tab works correctly.

Suggestion

If AvalonEdit is required by the WPF Code Editor, could you please consider adding it as an official NuGet dependency of FastReport.WPF (or the corresponding designer package)?

This would prevent the runtime exception and improve the out-of-the-box experience for new users.

Thank you!

(Optional) Minimal XAML

<Window
    xmlns:Designer="clr-namespace:FastReport.Design;assembly=FastReport.WPF">

    <Designer:WpfDesignerControl x:Name="designer"/>
</Window>


designer.Report = new Report();

The designer opens successfully, but switching to the Code tab throws the exception until AvalonEdit is installed.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.