What is the status of strong naming and InternalsVisibleTo with .NET Core?


#1

I have a test runner which uses various internal types from an assembly that I have made. The InternalsVisibleTo attribute is working fine. Now enter strong name signing:

I made a key and signed everything, and modified the InternalsVisibleTo of the assembly to include the public key. For a Xamarin Android runner, for example, this works alright but a .NET Core runner project fails to compile because it cannot access internal members.

[assembly: InternalsVisibleTo("Couchbase.Lite.Tests.NetCore,PublicKey=002400000c800000940000000602000000240000525341310004000001000100df5890b688df55bfd31409e7dc9be89984bfba0ae2d99a429c6490d16b53d029dd09b741d1e15fdbf5f056e235fd8e17b51775a4075c37aca89e558d4022c2e037bc05fc54808d15d926ebdb97c1bbf063c0dbd20e81550a72f2641f3b63ed76c446750e7b35aaeb52b444336a008939b3ab70fca8bcc3b62c5978d8800069f1")]

sn -Tp Couchbase.Lite.Tests.NetCore.dll
Public key (hash algorithm: sha256):
002400000c800000940000000602000000240000525341310004000001000100df5890b688df55
bfd31409e7dc9be89984bfba0ae2d99a429c6490d16b53d029dd09b741d1e15fdbf5f056e235fd
8e17b51775a4075c37aca89e558d4022c2e037bc05fc54808d15d926ebdb97c1bbf063c0dbd20e
81550a72f2641f3b63ed76c446750e7b35aaeb52b444336a008939b3ab70fca8bcc3b62c5978d8
800069f1

Public key token is 9a46e652e41ce60c

I feel like I’m missing something, or is this feature just not fully there yet?


#2

This is still the case months and months later…a little help?


.NET Foundation Website | Blog | Projects | Code of Conduct