Closed SteveBush closed 4 years ago
.NET Framework won't load a strong named assembly that references one without a strong name. You can file a bug against the library you consume expressing your wish that they start strong name signing. You can stop strong naming your own assembly to get working. This is fine for an application. But if you're writing a library for others to reuse, you'll be further propagating the limitation that others cannot strong name sign if you don't sign yours.
The strong name signing is done in the template based on an snk file. If you delete it and all references to it, your projects will stop strong name signing.
This is what I thought. If I want to keep strong naming my libraries then I need to either get the dependency library to sign their assemblies or sign the dependent assemblies as a part of the build using a tool like StrongNamer. I've got this working with StrongNamer but it does not handle dependencies and build concurrency well. I often have to build a couple of times to fix all of the dependencies as both the source library and consuming .NET framework test application need to have all assemblies signed.
Thanks again.
I'm using your template in a solution that targets net472;netcoreapp2.1;netcoreapp3.1. One of the src projects includes a dependency on Nitro.AsyncEx.Coordination which is not strong name signed.
When I run a test project locally using Visual Test Explorer and targeting net472, I get the following error:
Tests work fine for .netcoreapp2.1 and netcoreapp3.1 and in GitHub Action and Azure pipeline builds so it's just locally using Visual Studio Test explorer and targeting net472.
I have tried the app.config trick by adding the following and including it in my test project.
It still doesn't work. If I strong name sign the dependencies manually or with the StrongNamer package then everything works.
Any advice on how to work around this issue would be appreciated.
Thanks.