1-click application validation failed MonoCecil.dll c#

49 Views Asked by At

I have a problem running my 1-click application. It stopped working with an error code "Application validation did not succeed". The problem is related to Mono.Cecil.dll and related signature validation.

If I turn publish status of Mono.Cecil.dll to exclude in VisualStudio/Properties/Publish/Application files the app starts working ok for majority of users, but some users report errors with certain functionalities.

Any idea what could be the issue? I took over some legacy code so I am not sure why this dll was included in the code. Previusly it was working ok with this dll and I did not modify it.

Errors:

System.Deployment.Application.InvalidDeploymentException (SignatureValidation) Strong name signature not valid for this assembly Mono.Cecil.dll

1

There are 1 best solutions below

1
On

Copied from the comment.

You have to be very careful about what libraries/packages are being referenced by your project, as they can bring harms to your end users if coming from certain sources.

Mono.Cecil, as a famous open source library, has been known to have tons of sources and only its NuGet package or its source code repo on GitHub can be trusted as they are managed by the original author.

The issue disappeared once you resolved that mysterious reference, but you can check out other references to make sure similar things won't happen in the future.

MSBuild bin log can reveal almost everything about the build, so you might start from there.