locked
How to make dll as trusted? RRS feed

  • Question

  • User-151352204 posted

    Hi How to make dll as trusted in VS2005?

    Thanks

    Wednesday, July 23, 2014 10:50 PM

Answers

  • User399763608 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 24, 2014 6:49 PM

All replies

  • User-1902643333 posted

    Please use Strongly-signed dll:

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

    Thursday, July 24, 2014 1:36 AM
  • User399763608 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 24, 2014 6:49 PM