Ignore strong names
I was using way too long hunting down the reason for a CS0012, I had the assumption that a non strong named assembly reference can bind to a strong named assembly reference just not the other way around which I thought was logical. (btw an error message with more info could have been useful)
But yeah, no some debugging and browsing of roslyn code base eventually made me notice that if either is strong named both must be.
This means nuget packages that come shipped strong named (like newtonsoft.json) will break comparability with older libraries, potentially, and including in my case, some you don't have control over.
Older versions, in most cases, works just fine in my use case.
So the question is, does MSBuild or the <PackageReference> tag it self have a way to either:
I'm sure someone else has found this annoying, or am I missing something here?
I noticed some library authors have decided to offer a strong named assembly separately, so some people seems to have gotten the message.
I am not mentioning at runtime since that is disabled in the runtime by default? atleast by some configurations, regardless it can be easily hacked at runtime by resolve events.
But yeah, no some debugging and browsing of roslyn code base eventually made me notice that if either is strong named both must be.
This means nuget packages that come shipped strong named (like newtonsoft.json) will break comparability with older libraries, potentially, and including in my case, some you don't have control over.
Older versions, in most cases, works just fine in my use case.
So the question is, does MSBuild or the <PackageReference> tag it self have a way to either:
- Ignore the strong name binding rule and don't emit it in metadata (but leaving potential build output with strong named assemblies that can be patched if nessesary) or,
- preferably, strip the strong name binding entirely before building.
I'm sure someone else has found this annoying, or am I missing something here?
I noticed some library authors have decided to offer a strong named assembly separately, so some people seems to have gotten the message.
I am not mentioning at runtime since that is disabled in the runtime by default? atleast by some configurations, regardless it can be easily hacked at runtime by resolve events.