EDN Admin
Well-known member
I want to use this to make a strong-named assemblys internals visible to my unit test assembly, but I am getting this error as soon as the unit test is compiled with code that accesses the internals:
Friend access was granted to Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0, but the output assembly is named Platform.Common.Tests.MBUnit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Try adding a reference to Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0 or changing the output assembly name to match.
In the strong-named assembly, I have this attribute applied, according with MSDN docs. The public key is definitely the one from the signing key used to strong-name the assembly: <font size=1>
[assembly: </font><font color="#008080" size=1>InternalsVisibleTo</font><font size=1>(</font><font color="#800000" size=1>"Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0"</font><font size=1>)] </font>
Anyone have an idea what is the problem here? Thanks
Riley
View the full article
Friend access was granted to Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0, but the output assembly is named Platform.Common.Tests.MBUnit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Try adding a reference to Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0 or changing the output assembly name to match.
In the strong-named assembly, I have this attribute applied, according with MSDN docs. The public key is definitely the one from the signing key used to strong-name the assembly: <font size=1>
[assembly: </font><font color="#008080" size=1>InternalsVisibleTo</font><font size=1>(</font><font color="#800000" size=1>"Platform.Common.Tests.MBUnit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100F50572916E334B04400DB3A65217E76A09ED6049FF6853CAF564E00FAEE2C851841372D6536ADC933CB6DF7B244CBAA2F59B7CF23F8CFE0A232F3DCF5FB479CE5644654DDFF2E94EAA1F58603D4BDB47376A170BDB3E9AE2EA5B05D3CC64A7AAB03EB3D53DA5DFFE888D771E1F0387F8C0BA5ADBF0DD8CC3414FBD7B1E24C7E0"</font><font size=1>)] </font>
Anyone have an idea what is the problem here? Thanks
Riley
View the full article