I checked. Bitcoin core 0.17.0 is saving the library in a different file and add several symlink.
@lontivero the code to ensure the dll is here was taking a symlink instead of the real library.
Might it be because of caching on the build machine?
[39;49m[39;49m[31mError Message:
[39;49m[39;49m[31m System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
[39;49m[39;49m[31mStack Trace:
[39;49m[39;49m[31m at NBitcoin.Script.VerifyScriptConsensus(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 927
at NBitcoin.Tests.script_tests.AssertValidScript(Script scriptPubKey, Transaction tx, Int32 n, ScriptVerify verify) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 776
at NBitcoin.Tests.script_tests.script_CHECKMULTISIG23() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 731
[39;49m[39;49m[31m[xUnit.net 00:00:39.1808997] NBitcoin.Tests.script_tests.script_json_tests [FAIL]
[39;49m[39;49m[31m[xUnit.net 00:00:39.1882006] NBitcoin.Tests.script_tests.script_CHECKMULTISIG12 [FAIL]
[39;49m[39;49m[31mFailed NBitcoin.Tests.script_tests.script_json_tests
[39;49m[39;49m[31mError Message:
[39;49m[39;49m[31m System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
[39;49m[39;49m[31mStack Trace:
[39;49m[39;49m[31m at NBitcoin.Script.VerifyScriptConsensusWithAmount(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Int64 amount, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, Money amount, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 936
at NBitcoin.Tests.script_tests.AssertVerifyScript(WitScript wit, Money amount, Script scriptSig, Script scriptPubKey, ScriptVerify flags, Int32 testIndex, String comment, ScriptError expectedError) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 379
at NBitcoin.Tests.script_tests.script_json_tests() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 361
[39;49m[39;49m[31mFailed NBitcoin.Tests.script_tests.script_CHECKMULTISIG12
[39;49m[39;49m[31mError Message:
[39;49m[39;49m[31m System.DllNotFoundException : Unable to load shared library 'libbitcoinconsensus.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibbitcoinconsensus.dll: cannot open shared object file: No such file or directory
[39;49m[39;49m[31mStack Trace:
[39;49m[39;49m[31m at NBitcoin.Script.VerifyScriptConsensus(Byte[] scriptPubKey, UInt32 scriptPubKeyLen, Byte[] txTo, UInt32 txToLen, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err)
at NBitcoin.Script.VerifyScriptConsensus(Script scriptPubKey, Transaction tx, UInt32 nIn, ScriptVerify flags, BitcoinConsensusError& err) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin/Script.cs:line 927
at NBitcoin.Tests.script_tests.AssertValidScript(Script scriptPubKey, Transaction tx, Int32 n, ScriptVerify verify) in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 776
at NBitcoin.Tests.script_tests.script_CHECKMULTISIG12() in /home/travis/build/MetacoSA/NBitcoin/NBitcoin.Tests/script_tests.cs:line 685
[39;49m2018-10-12T01:31:32Z Bitcoin Core version v0.17.0 (release build)
I checked. Bitcoin core 0.17.0 is saving the library in a different file and add several symlink. @lontivero the code to ensure the dll is here was taking a symlink instead of the real library.
I attempted to fix it by using the library instead of symlinks on https://github.com/MetacoSA/NBitcoin/commit/c10e8c380eec3207ed3b804e7f8589ded5d7d9b5 but the tests keep failing.
Might it be because of caching on the build machine?