SciSharp/TensorFlow.NET

[BUG Report]: Latest TensorFlow.NET is not strong named signed

Opened this issue · 1 comments

Description

I can no longer reference this assembly in from my own strong name signed assembly.

I get

CSC : error CS8002: Referenced assembly 'Tensorflow.Binding, Version=0.150.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

This regressed with b2fe5ca#diff-1355f2c1cc0c2076facc4422480563fc7943b2329cc45397f90c4a833bda68c8L50 which removed the AssemblyOriginatorKeyFile property.

This is a warning as error, if the warning is ignored, the following exception will occur when consuming the assembly from a strongly-named assembly on .NETFramework.

System.IO.FileLoadException: Could not load file or assembly 'Tensorflow.Binding, Version=0.150.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Reproduction Steps

Compile the following useTfNetSN.zip

This demonstrates both the warning and the runtime exception on .NETFramework.

Known Workarounds

None. We need to add back the strong name. This is a binary breaking change that also blocks upgrade.

Configuration and Other Information

No response

I tried to rollback to version 0.110.1 (before the removal of the strong name) and it also doesn't work, failing at runtime with:

Could not load file or assembly 'OneOf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

This is due to the introduction of a dependency on OneOf -- acae9b3

If I rollback to 0.100.4 it works again, since this is prior to the introduction of the OneOf dependency. IMO this binding library should be kept simple with few dependencies.