Strong Name Validation Failed

前端 未结 12 958
旧巷少年郎
旧巷少年郎 2020-12-05 07:07

Two machines. Both with .NET 3.5 and the VS 2008 VC++ SP1 redistributables

A single exe which uses two signed DLLs, one in C++/CLI and one in C#

The exe load

12条回答
  •  囚心锁ツ
    2020-12-05 07:37

    I encountered this today and stumbled across http://timgeerts.blogspot.co.uk/2009/08/strong-name-validation-failed.html, which seems to be the solution.

    Option 1) Turn off code coverage (in VS 2010, go to Test Settings -› Data and Diagnostics -› Untick the "Enabled" box next to Code Coverage).

    Option 2) Add the signing key file to the code coverage configuration (in VS 2010, go to Test Settings -› Data and Diagnostics -› select Code Coverage and click on "Configure" at the top. This corresponds to the "keyFile" attribute for the CodeCoverage tag in the .testsettings file.)

    In VS 2012, code coverage is enabled by default. It can be disabled through a .runsettings file with an appropriate exclusion. See http://msdn.microsoft.com/en-us/library/jj159530.aspx for more information and a sample file. For option 2, although there doesn't seem to be an explicit setting available in the .runsettings file, the right thing seems to happen automatically with regard to signing (YMMV). However, if you're referencing a VS 2010 .testsettings file then it will need editing as above.

提交回复
热议问题