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
Inconsistency in Persistence of Property Values with DesignerSerializationVisibility between .NET Framework and .NET Core. #11269
Comments
@LeafShi1 can you guys pull out the list of types or properties in the sample project so we know which one's we're worrying about. |
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public bool CanChangeValue
{
get;
set;
} |
Hi @merriemcgaw / @LeafShi1 / @Epica3055 , Any update regarding the above designer related issues in .NET Core.? |
@RajClinton26 why are you using
@Epica3055 Can your team test that |
@elachlan I have used the However, when we used the Could you please provide the reason for this inconsistency? |
I have no idea, but at least there is a work around for now. When you say It is definitely a bug for a |
@elachlan - Thanks for the update. Can we consider this as a bug in .NET CORE.? |
Up to the team. I do not work on the winforms team. I suggest using |
We will take a look at this, but be aware that since a simple workaround exists this issue won't be high in the priority list. |
Bug Description
When utilizing a property with DesignerSerializationVisibility set to 'Content', an inconsistency has been observed between the behavior of .NET Framework and .NET Core. Specifically, after assigning a value to this property in the designer, the assigned value persists after rebuilding in .NET Framework, but not in .NET Core.
Could you please suggest a solution to ensure consistent behavior of DesignerSerializationVisibility between .NET Framework and .NET Core?
Replication Procedure:
Build the both .NET Framework and .NET core sample successfully.
In designer Right-click the control and select "Properties" from the context menu.
Assign a value to the CanChangeValue property in the designer.
Rebuild the solution.
Check if the assigned value to the CanChangeValue property persists after rebuilding the solution.
Observed Behavior
After rebuilding the project, the assigned value to the property in the designer persists in .NET Framework but not in .NET Core.
Expected Behavior:
The assigned value to the property in the designer should persist after rebuilding the project in both .NET Framework and .NET Core.
Sample
Framework Sample
CCFramework.zip
Core Sample
CustomControl.zip
Screenshots
In Framework
In.Framework.mp4
In Core
In.Core.mp4
Environment
Operating System: Windows 11
.NET Framework version: 4.6.2
.NET Core version: 6.0
IDE : Visual Studio professional 2022 (17.9.6)
The text was updated successfully, but these errors were encountered: