Start Debugging

Tag: csharp

346 posts · Page 2 of 35

How to add a strong-named assembly's full public key to InternalsVisibleTo in an SDK-style project
A signed assembly must name its friend by the full 320-character public key, not the token, or the build fails with CS1726 or CS0281. Get the key with sn -p and sn -tp, or with a cross-platform .NET script, then put it in the Key metadata of an InternalsVisibleTo item in the .csproj. Covers the PublicKey property fallback, Moq's DynamicProxyGenAssembly2 key, and the line-break trap.
Prev Next