When using
- C# Strongnames on DLLs and
- using the InternalsVisibleTo tags and
- when the public key uses SHA256 (or SHA512)
We're noticing that the compile process fails as if the InternalsVisibleTo
tags were never even declared. The error we get is MyInternalClass is inaccessible due to its protection level <snip>
When the public key uses sha1 (in step #3 above), the compile process works perfectly with no issues and the internals are exposed properly to the test project. The way we're creating the strongname keys is
sn -k 4096 SignKey.snk
sn -p SignKey.snk SignKeyPublic.snk sha256
sn -tp SignKeyPublic.snk
And the way we're exposing the project's internals to it's test project is:
[assembly: InternalsVisibleTo("MyProjectTest, PublicKey=LongPublicKeyHere")]
which we stick inside the Properties\AssemblyInfo.cs
of the MyProject
project.
Question: How to use SHA256 or better in the strongname process?
EDIT: Or is this a bug in the VS2012 tools?
Platform, Tools: VS2012 (Update 3), .NET 4.5, Windows 8 x64