[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

Đang mở
#6,992 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu trong WinformsSamples\datagridview\CSWinFormDataGridView và kiểm tra CSWinFormDataGridView.csproj. Chuyển target của nó sang net9.0-windows và chạy dotnet build với .NET 9 SDK được chỉ định, sau đó xem xét các thuộc tính bị ảnh hưởng dựa trên hướng dẫn tuần tự hóa được tham chiếu. Được xem là hoàn tất khi sample build thành công mà không có lỗi tuần tự hóa mã đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
3.7k
Fork
5.1k
Merge trung bình
19 giờ 47 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/samples

Tất cả issue của dotnet/samples

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.