none
Impossible sign assembly

    Question

  • I have a solution running with 3 assembly .dll

    it runs, even signed on another machine.

    New machine, imported key, not running "impossible sign assembly" "not possible open key file" "file used by another process"

    This is appearing when compiling solution with IMPORTED key or .dll with IMPORTED key. 

    This is appearing when compiling solution with new generated key on new machine or .dll with new generated key in new machine

    WITHOUT key (solution and .dll) IS compiled OK but I desire to improve the solution adding the Key in order (I think) to avoid the message "unknown .. . " by installation.

    Wednesday, January 18, 2017 12:49 PM

Answers

  • Thanks to all.

    After two months of pain was a new settings of the usual antivirus.

    It seems stupid I know. Bu may be someone will be helphed by this.

     

     

    StefanoZot Developer Network

    • Marked as answer by StefanoZot Wednesday, January 25, 2017 1:28 AM
    Wednesday, January 25, 2017 1:28 AM

All replies

  • Hi Stefano,

    There are two concepts:

    1) Signing assemblies with a strong name. See:

    Strong-Named assemblies:

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

    this is done per-project within Visual Studio in Project properties, Signing tab, where you specify the file with the key (or you create a new one). See:

    How to: Sign an Assembly with a Strong Name
    https://msdn.microsoft.com/en-us/library/xc31ft41(v=vs.110).aspx

    Strong-named assemblies don't prevent the Unknown Publisher warning when running the setup

    2) Code signing (Authenticode): this applies to setups (of assemblies or native dlls, exes, etc.). This does prevent the Unknown Publisher warning when running the setup. You need to buy a certificate, personal or company, and sign your setup. See:

    Introduction to Code Signing

    https://msdn.microsoft.com/en-us/library/ms537361(v=vs.85).aspx


    My portal and blog about VSX: http://www.visualstudioextensibility.com
    Twitter: https://twitter.com/VSExtensibility
    MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    Wednesday, January 18, 2017 5:05 PM
  • Thank you Carlos for the second issue on Autenticode. 

    I will purchase a certificate. And now I know that this is another story. 

    But let try to get the application running with strong name. 

    I  already have seen the link you send me. My key was generated on another machine and there everyting was running. 

    Now, on the new PC, the imported old key is NOT working. But also a new generated key in causing problems. 

    I generated the new key using the sign panel on the consuming project. 

    Then I added it in the panel of the .dll where a copy of this key was added to the .dll project. 

    But this .dll strongnamed (in this way) is not compiled. Error: the Key  file "is impossible to be opened because used by anoter process"  

    Thursday, January 19, 2017 6:58 AM
  • Hi,

    It is not clear to me what you are doing, so try this:

    On the new computer:

    1) If you create a new project with a new .snk file (<New...> item in combobox), does it build or do you get an error?

    2) If you create a new project with the existing .snk file copied from the old computer (<Browse...> item in combobox), does it build or do you get an error?

    3) If you set a workspace, get the latest version from source control (which should include both the project files and the .snk file), does it build or do you get an error?


    My portal and blog about VSX: http://www.visualstudioextensibility.com
    Twitter: https://twitter.com/VSExtensibility
    MZ-Tools productivity extension for Visual Studio: https://www.mztools.com


    Thursday, January 19, 2017 7:09 AM
  • Ok I'do carefully points 1 and 2.

    May be point 3 is the problem. I never set a workspace. Until now I simply worked in solutions folder.

    please add a link to workspaces.

    Thank you 

    Thursday, January 19, 2017 9:42 AM
  • I did not set the workspace. 

    New project OK

    new Key from combo  OK Key added to the project

    Compilation  - Not OK

    the new project with the usual Key is NOT compiled. The error message is the same.

    Can not insert image. It seems I am not a verified user

    Thursday, January 19, 2017 1:16 PM
  • Hi,

    Welcome to MSDN forum.

    Since our forum is to talk about the setup of visual studio, I will move your thread to a appropriate forum to get more support. Thank you for understanding.

    Best regards,

    Joyce


    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 20, 2017 6:25 AM
  • Thank you Joyce, but, please, where did you move it?
    Friday, January 20, 2017 11:23 AM
  • You might try asking over here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, January 20, 2017 1:52 PM
    Moderator
  • Thanks to all.

    After two months of pain was a new settings of the usual antivirus.

    It seems stupid I know. Bu may be someone will be helphed by this.

     

     

    StefanoZot Developer Network

    • Marked as answer by StefanoZot Wednesday, January 25, 2017 1:28 AM
    Wednesday, January 25, 2017 1:28 AM