The following steps are required when signing a compiled library with a Digital Signature is requested.
Step-by-step guide
Create a code signing certificate and add it to the Windows cert store (See informational note below on the 'Powershell command')
Add the certificate into View > Security Screen > User > Digital Signature
Select the "Enforce signing of compiled libraries" on that same screen
Save as compiled library
$cert= New-SelfSignedCertificate-DNSName"www.self.signed"-CertStoreLocationCert:\CurrentUser\My-TypeCodeSigningCert-Subject"But surely you have your own CA signed code signing cert"