I am trying to get Moq (or rather Castle.Core) to create a proxy for my internal types.
The following (when added to my test project) allows you to work:
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
However, this (safer version) does not:
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=002400000480000094000000060200000024000052534131000400000100010077f5e87030dadccce6902c6adab7a987bd69cb5819991531f560785eacfc89b6fcddf6bb2a00743a7194e454c0273447fc6eec36474ba8e5a3823147d214298e4f9a631b1afee1a51ffeae4672d498f14b000e3d321453cdd8ac064de7e1cf4d222b7e81f54d4fd46725370d702a05b48738cc29d09228f1aa722ae1a9ca02fb")]
Note: the public key here is different from that described here , I re-checked the public key of the lock. Core.dll, which comes with the current version of Moug for Nuget.
Do I still have the wrong key?
[EDIT]
I noticed that the full Moq download from the official site (not Nuget) contains the NET40-RequiresCastle folder with a lower dll, which implies that Castle.Core code was included in the default Moq.dll file, I think.
I looked at the Castle.Core.dll file that they provide for Silverlight, and suggesting that they would use the same version all over?
source share