This is a migrated thread and some comments may be shown as answers.

[Solved] Sign Dll's with my own snk file

1 Answer 225 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
may215
Top achievements
Rank 1
may215 asked on 13 Feb 2010, 10:11 AM
Hi,
I am trying to sign Telerik dlls with my own snk files and i am getting error about the internal objects: eg: Telerik.Web.UI.Functions.TFunc<System.Web.UI.Control,object>' is inaccessible due to its protection level.

I followed the this instructions:
Replace C:\RadControlsAjaxSource\Telerik.Web.UI\Telerik.Web.snk with your SNK file.
2. Replace C:\RadControlsAjaxSource\Telerik.Web.Design\Telerik.Web.snk with your SNK file.
3. Now you need to replace the public key blob and token of the original SNK file with yours.
4. Start Visual Studio command prompt and change the current directory to C:\RadControlsAjaxSource\Telerik.Web.UI: cd C:\RadControlsAjaxSource\Telerik.Web.UI\
5. Extract the public key from the SNK file by running: sn -p Telerik.Web.snk public.key
6. Now display the public key and token: sn -tp public.key
Copy the public key
8. Open C:\RadControlsAjaxSource\Telerik.Web.UI\Properties\AssemblyInfo.cs and find the following line: [assembly: InternalsVisibleTo("Telerik.Web.Design, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d7f4574851eb0ea83c0b26dfc9d3569e654c8b902eaab99858ddb7aa4b9b6810f74571d9b572b93c089f3b86a74fe1f72ead3eafc6c928ff4576e3bc49904d1360f6776898125ecb928a5365968d9d1931987e382c0110a944139aba1035d00d9cfe84803a8d02ae8d38f9709fd910558bb1233840b3eaa2875b1f35d024b3")]
9. Replace the PublicKey attribute with the value copied from the previous step. Keep in mind the SN tool generates the public key in a multiline format – you need to remove the newlines beforehand.
10. Copy the public key token from the previous screen (the SN -tp output)
11. Open C:\RadControlsAjaxSource\Telerik.Web.UI\DesignerInfo.cs
12. Replace “29ac1a93ec063d92” (without quotes) with the new public key token returned by the SN tool.

But, i still getting errors about it?
Can you please advise..

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 18 Feb 2010, 08:21 AM
Hello May,

Can you verify that you have correctly set the InternalsVisibleTo attributes PublicKey value to your new key (the same you have rebuild the Telerik.Web.Design assembly). I suspect that the error you are getting is due to the fact that TFunc is with internal visibility thus your design project is not correctly rebuild.

Regards,
Rosen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
may215
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or