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

Remove requirement for Serializable attribute #3687

Closed
rockfordlhotka opened this issue Feb 12, 2024 · 5 comments · Fixed by #3877
Closed

Remove requirement for Serializable attribute #3687

rockfordlhotka opened this issue Feb 12, 2024 · 5 comments · Fixed by #3877

Comments

@rockfordlhotka
Copy link
Member

rockfordlhotka commented Feb 12, 2024

Microsoft is removing support for BinaryFormatter in .NET 9, and presumably this means they might remove the SerializableAttribute type.

dotnet/runtime#98245

CSLA never really used this, but does require it as a vestige of when we used to support BinaryFormatter.

CSLA should no longer require the use of the Serializable attribute for serializable types.

@blowdart
Copy link

We can't remove the attribute, it would be too breaking :) It's just nothing will care about it.

@rockfordlhotka
Copy link
Member Author

@blowdart agreed - though Microsoft might remove the attribute (I don't know).

@blowdart
Copy link

In this case I am Microsoft. We don't have any plans to remove it as yet.

A much more detailed white paper will be coming soon, my issue in the dotnet repo is really just an overview. Hopefully that will set your mind to rest, but honestly removing the requirement is probably a decent idea if your serializers don't need it.

@rockfordlhotka
Copy link
Member Author

That's excellent Barry, I wasn't really paying attention to the identity of the person doing the reply 🫢

I agree with the idea that removing the attribute from .NET would be a massive breaking change.

In the case of CSLA though, removing the checks that require it (I think) makes sense, because other serializers (including the one that's now default in CSLA) don't use it for anything - it was literally a vestige of the way CSLA was originally based on BinaryFormatter 20 years ago.

@rockfordlhotka rockfordlhotka self-assigned this Apr 24, 2024
rockfordlhotka added a commit that referenced this issue Apr 24, 2024
rockfordlhotka added a commit that referenced this issue Apr 24, 2024
)

* #3841 Remove UWP support from CSLA

* Fix build warning

* #3687 Remove analyzer that checks for the Serializable attribute

* #3687 Remove analyzer tests
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants