Share via


How to make dll as trusted?

Question

Wednesday, July 23, 2014 10:50 PM

Hi How to make dll as trusted in VS2005?

Thanks

All replies (2)

Thursday, July 24, 2014 6:49 PM âś…Answered

Hi,

Have a look this this Youtube playlist https://www.youtube.com/playlist?list=PL8598C97BA1D871C1, it's very simple and got some nice explanation with it.

You can generate a key pair from the VS command prompt. 

sn -k C:\YourKeys.snk

In your AssemblyInfo.cs class you add the following line near the bottom (you need to escape the backslash).

[assembly: AssemblyKeyFile("C:\\YourKeys.snk"]

Furthermore, if you want to install the assembly into the GAC you can use the following command in the VS command prompt once you have done the previous steps. (Remember to navigate to the path)

gacutil -i YourClass.dll

Thursday, July 24, 2014 1:36 AM

Please use Strongly-signed dll:

http://msdn.microsoft.com/en-us/library/xc31ft41(v=vs.110).aspx