How to disable code signing on Azure Dev Ops - Still getting “Error signing output with public key from file mssharedlibsn1024.snk - File not found”

0

We've disabled our code signing in our dev branch build pipe, and it fails with the following error:

Error CS7027: Error signing output with public key from file '......\SigningCertificates\mssharedlibsn1024.snk' -- File not found.

It keeps looking for the file even after we removed it from the solution and the project and the source control.

When I tried enabling the code signing to overcome this error, I got a different one instead (because of the code signing that occurred):

Error: The process 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe' failed with exit code 1 Initialization method

Microsoft.Crm.Sales.ProductivityBot.Test.Cards.EntityCardArgsTests.Setup threw exception. System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Crm.Sales.ProductivityBot, Version=0.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A).

The above error comes from the test project which is not signed.

So it goes down to 2 questions:

  1. How do we get rid of the snk file error and truly disable the code signing?
  2. In case the code signing runs (such as cases we do want to run the tests), how do we configure the tests project to use the signed tested "main" project?
c#
.net
azure-devops
code-signing
asked on Stack Overflow Mar 5, 2019 by ybro

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0