作成日: 2022/07/22 最終更新日: 2022/12/21
文書種別
不具合
発生環境
.NET 6
状況
修正済み
詳細
.NET6アプリにおいてFlexReport(C1.WPF.Report.Ja パッケージ)を使用しているとき、バーコードフィールドを含むレポート定義を読み込もうとすると、以下の例外が発生します。
[#document/Reports/Report/Fields/BarCodeField] ノードの逆シリアル化中に例外が発生しました。エラー:
Exception has been thrown by the target of an invocation.
[#document/Reports/Report/Fields/BarCodeField] ノードの逆シリアル化中に例外が発生しました。エラー:
Exception has been thrown by the target of an invocation.
回避方法
この問題は2022J v3(6.0.20223.380)で修正されました。
※修正版を適用しない場合の回避方法は以下のとおりです
以下の手順を実行してください。
※修正版を適用しない場合の回避方法は以下のとおりです
以下の手順を実行してください。
- System.Text.Encoding.CodePages NuGetパッケージを手動でインストールする
- App.OnStartupメソッド等にSystem.Text.Encoding.RegisterProviderメソッドを呼び出すコードを記述する
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
base.OnStartup(e);
}
}