Arcade targets override AssemblyOriginatorKeyFile
See original GitHub issueWhen using arcade to publish a project that sets AssemblyOriginatorKeyFile
, StrongName.targets
overrides the key file (because arcade imports set a default value for StrongNameKeyId
): https://github.com/dotnet/arcade/blob/9800953d3b420fd7f81d88c5332df6d1c38e875e/src/Microsoft.DotNet.Arcade.Sdk/tools/StrongName.targets#L35
I believe StrongName.targets
should not be setting properties as this violates the convention that static properties are computed in props files. Maybe this logic should be moved to StrongName.props
, which would allow my project’s setting of AssemblyOriginatorKeyFile
to take precedence.
I can work around this by:
- setting
StrongNameKeyId
in my project to some unknown string, preventing arcade’s override, and - setting
PublicKey
andPublicKeyToken
to some unknown string to satisfy the check in https://github.com/dotnet/arcade/blob/9800953d3b420fd7f81d88c5332df6d1c38e875e/src/Microsoft.DotNet.Arcade.Sdk/tools/StrongName.targets#L84-L85
I may have missed something, but I couldn’t find any place where edit: they’re used in the arcade PublicKey
or PublicKeyToken
were actually used, so I think those shouldn’t be required to be set in the first place.InternalsVisibleTo
generator - see below.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (16 by maintainers)
Top GitHub Comments
That is the goal. 😃
You can set
StrongNameKeyId
tocustom
already to opt-out. The one thing that’s missing is the error reporting that will tell you to do so.