Strong Signed Assemblies

前端 未结 10 1181
青春惊慌失措
青春惊慌失措 2020-12-05 13:42

I have a project I made in Visual Basic 2008 Express. I converted it from someone else\'s C# project, but it works. It has several DLL dependencies. I went to publish my pro

相关标签:
10条回答
  • 2020-12-05 14:03

    Strongly named assemblies are mainly assemblies which have are signed by a cryptographic key. This is fairly easy to do with Visual Studio and does not require re-ordering of your dependencies.

    I'm using non-express Visual Studio so the steps may be slightly different for you.

    • Right click on the project and select properties
    • Click on the Signing tab
    • Check "Sign the assembly"
    • In the combo box select "<New...>"
    • Complete the wizard
    • Rebuild
    0 讨论(0)
  • 2020-12-05 14:04

    Using Adam Robinson's solution allowed me to publish, but I found that users could not install the project once it was published, as the end user system would complain of an inability to install, noting hard drive space. As this seemed highly unlikely to be the root cause, I looked further into it.

    Apparently the basis for my problem was that one of my references was also referencing a .dll that my project used, but a different version. ClickOnce was not having this, and refused to copy the second version of the .dll to the user's system, citing the version already present. Fixing it so the .dll and the project referenced the same version of the other .dll removed the error and corrected the install problem.

    0 讨论(0)
  • 2020-12-05 14:06

    The workaround is more simple than that:

    1. Go to your project.
    2. Right click and Select Properties.
    3. Go to the Security Tab.
    4. Uncheck Enable ClickOnce security Settings.

    Unless you are deploying this application through ClickOnce, you don't need to StrongName your assemblies.

    0 讨论(0)
  • 2020-12-05 14:19

    I found my problem to be in the .csproj file

    <Reference Include="OtherProjectNothingToDo">
      <HintPath>..\..\..\..\Pedidos\XBAP\Pedidos\Pedidos\bin\Release\Pedidos.exe</HintPath>
    </Reference>
    

    Then I removed it using notepad and it is okay now.

    0 讨论(0)
  • 2020-12-05 14:21

    Check this link out...it has instructions for signing your assembly with a strong name:

    MSDN: Signing an Assembly with a Strong Name

    0 讨论(0)
  • 2020-12-05 14:24

    This just worked for me after the above mentioned solutions failed:

    Remove the reference to the assembly in error, then add it again.

    0 讨论(0)
提交回复
热议问题