Loading Delay Signed assembly with Assembly.LoadFile()

0

as part of our build process (as Post Build event in a project) I need to run a .net app that loads an assembly that is delay signed. This was OK when we had our own TFS server we could use sn -Vr to register assemblies for verification skipping.

However, when we moved to Azure DevOps we are getting exception, because we can't register assemblies for skipping via sn -Vr. Any way to get around this?

System.IO.FileLoadException: Could not load file or assembly 'MyAssembly, Version=5.1.38.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
File name: 'MyAssembly, Version=5.1.38.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
The Zone of the assembly that failed was: MyComputer
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at ...
.net
exception
azure-devops
code-signing
asked on Stack Overflow Jul 27, 2019 by dan • edited Jul 28, 2019 by Shayki Abramczyk

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0