Why am I getting 'Assembly '*.dll' must be strong signed in order to be marked as a prerequisite.'?

后端 未结 27 629
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 20:28

I\'m trying to compile my excel addin using C# 4.0, and started to get this problem when building my project in Visual Studio. It\'s important to tell you that I haven\'t had th

相关标签:
27条回答
  • 2021-01-29 20:57

    After trying most of the solutions here, I finally just added a reference to the project from the click once project, this changed it to Include (Auto) from Include and it finally worked.

    0 讨论(0)
  • 2021-01-29 20:57

    I also bump into kind of problem, all I just had to do is delete the .dll (can be found in reference) that causing the error and add it again.

    Works like a charm.

    0 讨论(0)
  • 2021-01-29 20:57

    Just go to Publish -> Application File -> And change the effected dll publish status from prerequisite to include! This worked for me!

    0 讨论(0)
  • 2021-01-29 21:00

    Is your assembly properly signed?

    To check this, press Alt+Enter on your project (or right click, then Properties). Go to "Signing". Verify that the check box "Sign the assembly" is checked and the strong name key file is selected and "Delay sign only" is unchecked.

    0 讨论(0)
  • 2021-01-29 21:01

    There were too many projects in my solution to go through and individually update so I fixed this by:

    • Right-clicking my solution and selecting 'Manage NuGet Packages for Solution...'
    • Going to the Updates tab
    • Finding the affected package and selecting Update
    • Clicked OK and this brought all instances of the package up to date
    0 讨论(0)
  • 2021-01-29 21:03

    I recently hit this problem. In my case, I have NuGet packages on different assemblies. What I had was different versions of the same NuGet packages associated with my own assemblies.
    My solution was to use the NuGet package manager upon the Solution, as opposed to the individual projects. This enables a "consolidation" option, where you can upgrade your NuGet packages across as many projects as you want - so they all reference the same version of the assembly. When I did the consolidations, the build failure disappeared.

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