Resharper doesn't take into account [assembly:InternalsVisibleTo("MyUnitTests")]

New assembly attribute appeared in .NET 2.0 :
[assembly:InternalsVisibleTo("MenuFS.Tests")]

This attribute allows to view internal methods from another (trusted) assembly. This is particually usefull when creating Unit tests: VS 2005 creates test in a separate project and the only way to get an access to internal methods is to add [assembly:InternalsVisibleTo("MenuFS.Tests")] attribute to tested assembly.

When I add this attribute, compile passes just fine, but Resharper shows red curves (surely, it thinks that internal class are not availailable from another assembly). This is wrong.

Can it be fixed? I checked this on buid 209.

1 comment
Comment actions Permalink

InternalsVisibleTo attribute support will be implemented later (before 2.0
release). Request in tracker:

http://www.intellij.net/tracker/resharper/viewSCR?publicId=8876

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

New assembly attribute appeared in .NET 2.0 :
[assembly:InternalsVisibleTo("MenuFS.Tests")]
This attribute allows to view internal methods from another (trusted)
assembly. This is particually usefull when creating Unit tests: VS
2005 creates test in a separate project and the only way to get an
access to internal methods is to add
[assembly:InternalsVisibleTo("MenuFS.Tests")] attribute to tested
assembly.

When I add this attribute, compile passes just fine, but Resharper
shows red curves (surely, it thinks that internal class are not
availailable from another assembly). This is wrong.

Can it be fixed? I checked this on buid 209.



0

Please sign in to leave a comment.