I could not find any clear statement on MSDN regarding this, there are some examples with strong names other are without, for me it seems like it should work even without but its not working.
Thank you
Reason. Based on the official site of VS, “Strongly-named” (or sometimes“strong-name”) is necessary for the assemblies to be accessed by other assemblies.
The InternalsVisibleTo attribute is a well-known attribute for testing assemblies. The internal methods of an assembly become visible to the test project. This allows you to test the internal methods without using reflection, so your tests are more maintainable.
First, right click on the Assembly DLL -> Properties -> Details. Here you can find the name, version and Culture of your Assembly. It will give you the public key.
In the "Solution explorer" click on your project assembly name, and then head to "Tools > Get PublicKey".
The documentation is quite explicit:
Both the current assembly and the friend assembly must be unsigned, or both must be signed with a strong name. If they are signed with a strong name, the argument to the
InternalsVisibleToAttribute
constructor must include the full public key as well as the name of the assembly.
See this answer for an example of what full public key means.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With