I have a C# exe which is referring to some other dlls and the dlls are signed using a strong name key. It works fine when I execute this in my local system. But when I call the same exe from Azure release pipeline, it is giving me the below error.
System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
I tried sn.exe -Vr "dll path" for all the referred dlls. And also tried the command bypassTrustedAppStrongNames enabled="false" & "true" within the exe's app.config. But both didn't help.
Can anyone please suggest a solution for this. Thanks in advance.
You can try to search for System.Management.Automation reference in the csproj file and replace that with <Reference Include="System.Management.Automation" />
For this ,please refer to this case with similar issue.
You can try to disable the strong name validation in an application level by adding the following snippet in an Application Configuration File
<configuration>
<runtime>
<bypassTrustedAppStrongNames enabled="true" />
</runtime>
</configuration>
For more info you can take a look in Microsoft documentation page
I'm not sure you will have permissions to skip validation on a hosted agent. So you can either make your own agent or
User contributions licensed under CC BY-SA 3.0