none
Strong naming for Microsoft libraries RRS feed

  • Question

  • Hi,

    I am working on .Net framework 4.0, here i am using Microsoft.Practices.Composite.dll,   Microsoft.Practices.Composite.Presentation.dll, Microsoft.Practices.Composite.UnityExtensions.dll .. etc libraries, right now all these libraries are not strong named so my query is to how to strong name these libraries.


    Thursday, December 15, 2016 1:35 PM

All replies

  • Hi G M Tulasi kumar,

    >>right now all these libraries are not strong named so my query is to how to strong name these libraries.

    The Strong Name tool (Sn.exe) helps sign assemblies with strong names. Sn.exe provides options for key management, signature generation, and signature verification.

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 16, 2016 1:28 AM
  • Yes,  I have done strong naming for above libraries but i am getting this error 

    Error 1 The type 'Microsoft.Practices.Composite.Events.EventBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Composite, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'.

    Friday, December 16, 2016 4:25 AM
  • Hi G M Tulasi kumar,

    >>Error
    1
    The type 'Microsoft.Practices.Composite.Events.EventBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Composite, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'.

    According to your error, I wonder if you haven't reference the dll.

    Please use Nuget to download Microsoft.Practices.Composite package.

    About strong name, I also recommend you have a look at the following thread

    Strong Naming and Microsoft.Azure.ActiveDirectory.GraphClient

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 16, 2016 6:31 AM
  • Kristin,

    I have downloaded and installed the  Install-Package Prism -Version 4.0.0  from Package Manager Console, and i have clean and rebuild the solution then also it throwing same error which was mention in above thread.

    Tulasikumar G M.

    Friday, December 16, 2016 10:19 AM
  • Hi Tulasikumar G M.

    Please try to add the NuGet Package for Prism, which is already signed.

    Here I also found a similar thread as yours, please have a look.

    Strong Name for Microsoft.Practices.Composite-DLL leads to compiler error     

    Best regards,

    Kristin                             


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Kristin Xie Thursday, December 29, 2016 9:39 AM
    Monday, December 19, 2016 1:28 AM
  •  Kristin,

     I have tried in above procedure, it did not work, here i have a question how to do get this NuGet Package for Prism, is their any link or path to download, if i download then how can i merge into my solution.

    Regards,

    Tulasikumar

        

    Thursday, January 5, 2017 5:05 AM
  • Hi Tulasikumar,

    >> I have tried in above procedure, it did not work, here i have a question how to do get this NuGet Package for Prism, is their any link or path to download, if i download then how can i merge into my solution.

    Per my understanding, it is the same as when you download from any link or path. Actually, we could download form Nuget is the better choice.

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 6, 2017 2:53 AM
  • Kristin,

     Following procedure i have did while creating strong name.

     1. I Have created strong name key using vs 2015, On cmd screen I have executed following command ie, C:\ Windows\System32>sn -k ApplicationName.snk , then ENTER key i got a key file with respect to folder path.

    2.Then i  have configured the ApplicationName.snk  in my visual studio solution ie, Signing here Sign the Assembly check box is checked and  choose a strong name key file is configured with ApplicationName.snk ,this step repeated in all of my projects.

    3. Then i have removed all Reference and Re-Configured the all reference.

    4. In Tools NuGet Package Manager/Package Manager Console , i have executed this command Install-Package Prism -Version 4.0.0 , this package is downloaded in my solution with folder name packages, Here i have observed "packages.config" file is added in all my projects.

    5.Then i have build the solution, build is succeeded with warnings ie, Severit Code Description Project File Line Suppression State Warning CS8002 Referenced assembly 'Microsoft.Practices.Composite.Presentation, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

    Regards,
    Tulasikumar G M.

    Friday, January 6, 2017 11:53 AM
  • We know the tool. The question would be, if we are not violating some MS licenses on the libraries, which we are modifying by adding the strong name signature?

    The second problem would be, that some MS .Net assemblies are released without strong name, but with an Authenticode signature (e.g. as Microsoft.Azure.ActiveDirectory.GraphClient library mentioned by you in the replies below), and by adding the strong name ourselves, we are loosing the Authenticode. Yes, we could apply also our Authenticode signature, but this could lead to misunderstandings, as the Authenticode would suggest, that we may be the authors of the library, while we are not.

    Wednesday, June 13, 2018 5:12 PM