Azure DevOps Pipeline - Bypassing Strong Name Validation

774 views Asked by At

In our pipeline, we are building a Windows application that uses delay signing. We are using locbaml (checked into source control) to create satellite resource DLLs, and it uses Assembly.LoadFrom but it gives this error:

Could not load file or assembly 'XXXXX.resources, Version=5.1.38.1, Culture=en-US, PublicKeyToken=xxxxx' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Added bypassTrustedAppStrongNames to the locbaml app config, tried false and true, but didn't help:

<configuration>
  <runtime>
    <bypassTrustedAppStrongNames enabled="false" />
  </runtime>
</configuration>

https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/bypasstrustedappstrongnames-element

I don't think can I run sn.exe -VR *,{publicKeyToken} to make an exclusion, so how can I load an assembly with Assembly.LoadFrom which is delay signed on Azure DevOps?

0

There are 0 answers