We want to do everything possible to simplify the migration process for those moving to .NET Core 3 and future .NET 5. In this post, we’ll discuss script support in v19.2 and ask for your feedback as we fine-tune our development plans for 2020.
Note: If you’re unfamiliar with DevExpress Reports and its script support, please review the Scripts Overview help topic for more information.
Scripting Thanks to Roslyn
The CSharpCodeProvider
class from .NET Framework provides access to the code generator and code compiler. We’ve relied on it for years and as you may know, .NET Core still does not support it. Unfortunately, it does not look like any such support is planned for the future.
As we researched ways to introduce scripting support for .NET Core, we settled on the Microsoft.CodeAnalysis NuGet package because it gave us access Roslyn compiler facilities.
You can install this package into any application that targets .NET Core. In addition, you can leverage report script functionality regardless of the target operating system: be it is Windows, Linux or Mac.
How to Enable Report Scripts in .NET Core Apps
To get started and enable report scripts in your .NET Core app, you must:
- Install the Microsoft.CodeAnalysis NuGet package manually:
- DevExpress Reporting does not have direct dependency on this package. You will receive the following error message upon generating a report with scripts if the package is not found:
- Enable script execution as described in the Script Execution Modes help topic.
You can now open the DevExpress Report Designer and navigate to the scripts tab to incorporate report scripts:
You can learn more about scripting in our Scripts Tab - Visual Studio Report Designer help topic.
Your Feedback Counts
This enhancement is the first step in our mission to improve scripting support for DevExpress Reporting. To help us direct R&D efforts in an appropriate direction, please take a moment to answer the following short survey: