[dotnet-sdk-9.0.100-rc.2.24470.13] The windowsforms/datagridview demo App build with error: Property 'XXX' does not configure the code serialization for its property content

オープン
#6,992 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp
領域
desktop

調査の方向性

WinformsSamples\datagridview\CSWinFormDataGridView から開始し、CSWinFormDataGridView.csproj を確認します。net9.0-windows をターゲットに設定し直し、指定された .NET 9 SDK で dotnet build を実行してから、参照されているシリアル化のガイダンスに照らして影響を受けるプロパティを確認します。報告されたコード シリアル化エラーなしでサンプルをビルドできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

We are doing Application compatibility testing with this application against the latest .NET 9 SDK. When retarget the application to net9.0 and build with the latest .NET 9 SDK, it failed with error: Property 'xxx' does not configure the code serialization for its property content

After the investigation, it is related to a .NET 9 breaking change https://github.com/dotnet/docs/issues/42724

You can fix the CodeDOM Serialization configuration for properties if you want

  • Attribute with the DesignerSerializationVisibilityAttribute OR
  • Attribute with the DefaultValueAttribute OR
  • Amend a private bool ShouldSerialize[Property] method, which controls the serialization at Design Time.

Steps to Reproduce (for bugs)

  1. Cd to WinformsSamples\datagridview\CSWinFormDataGridView
  2. Change TargetFramework to net9.0-windows in the CSWinFormDataGridView.csproj.
  3. dotnet build with 9.0.100-rc.2.24470.13.

Expected Result:
build successfully without error
Actual Result:
build failed with Property 'xxx' does not configure the code serialization for its property content

Please refer to more information from https://github.com/dotnet/winforms/issues/12220

主要言語
C#
スター
3.7k
フォーク
5.1k
平均マージ
19時間 47分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/samples のほかの issue

dotnet/samples の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。