Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 #6992

Open
CancanTang opened this issue Oct 9, 2024 · 0 comments

Comments

@CancanTang
Copy link

CancanTang commented Oct 9, 2024

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 dotnet/docs#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 dotnet/winforms#12220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant