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

NS2001 For Internal class with Protected Internal constructor #144

Closed
akalnay opened this issue Sep 6, 2020 · 2 comments · Fixed by #145
Closed

NS2001 For Internal class with Protected Internal constructor #144

akalnay opened this issue Sep 6, 2020 · 2 comments · Fixed by #145
Assignees
Labels
bug Something isn't working
Milestone

Comments

@akalnay
Copy link

akalnay commented Sep 6, 2020

I am getting a NS2001 "Could not find accessible constructor" warning for a class with the internal access modifier and with a parameterless constructor that has the protected internal access modifier. I believe that warning to be a false positive as I'm successfully creating a partial sub which is working as expected even though the warning is present. The warning goes away if I change the constructor to protected instead of protected internal but I'd rather keep it as protected internal as that is the correct accessibility level. I have the [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=...)] attribute in the assembly I'm testing. My tests are in a friend assembly.

@tpodolak
Copy link
Member

tpodolak commented Sep 7, 2020

Hi @akalnay, that looks like bug to me. Thanks for reporting, will be fixed in the next release

tpodolak added a commit that referenced this issue Sep 7, 2020
@tpodolak tpodolak added this to the 1.0.14 milestone Sep 7, 2020
@akalnay
Copy link
Author

akalnay commented Sep 8, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants