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

Existence of SerializableAttribute in .NET Core #1683

Closed
FantasticFiasco opened this issue Jul 18, 2016 · 7 comments
Closed

Existence of SerializableAttribute in .NET Core #1683

FantasticFiasco opened this issue Jul 18, 2016 · 7 comments

Comments

@FantasticFiasco
Copy link
Contributor

I have a question regarding the class SerializableAttribute that is being part of nunit.framework.dll for .NET Core.

I do understand that the class is a shim or polyfill (I don't really know the different) for .NET Core, because I've added the class myself in the assembly I am writing. My problem is that I get a compiler error stating that the class exists both in nunit.framework.dll and in my assembly. I can of course remove my declaration of SerializableAttribute and reference NUnit from my assembly, but it feels wrong to reference something intended for tests.

That do you propose me to do?

@CharliePoole
Copy link
Contributor

Maybe we shouldn't have it in the framework. It's only purpose is so that we don't have to use conditonal complilation every place the attribute is used.

@FantasticFiasco
Copy link
Contributor Author

Yes, that is the same purpose I have it in my assembly. One almost wishes that there was a shim/polyfill NuGet package we could both reference.

@FantasticFiasco
Copy link
Contributor Author

Another possible solution would be that you mark the attribute as internal. I would be happy to produce a PR if you consent.

@CharliePoole
Copy link
Contributor

Seems like a good idea if you're willing to create a pr.

@FantasticFiasco
Copy link
Contributor Author

I'd be honored. I would like one clarification though, strictly speaking the PR would be considered a breaking change, if NUnit is following semver that would mean incrementing the major version, or am I wrong?

@CharliePoole
Copy link
Contributor

I don't think it's a breaking change. We only treat something as a breaking chnage if it modifies a Type or method that we have exposed intentionally for use by users. NUnit has a long histrory of internally used classes and methods being public, which we are in the process of getting away from.

In any case, you don't have to worry about versioning in doing a PR. That happens when we do a release.

@CharliePoole
Copy link
Contributor

Closed via PR #1691

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

No branches or pull requests

2 participants