You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NuGet / Visual Studio 2015 is now able to perform the update to new release(2.1.4.7). All very strange.
The error message was "Unable to find metadata of NBitcoin xxxx".
Thanks anyway for the answer.
By the way, I am interested to know if it the lib works fine on Univeral Project, since I did not tried. Let me know.
I don't think you have access to the Node class (to connect to network) on Universal project, can you confirm ?
If it is a problem for you, you can try NBitcoin For Mono package which include everything and should also works fine on Universal.
On universal Windows (app for Windows 10) NBitcoin.Mono fails installation with NuGet.
With NBitcoin, when launching the following code is generated an exception:
var k = new NBitcoin.Key();
System.InvalidOperationException: You must set the RNG (RandomUtils.Random) before generating random numbers
at NBitcoin.RandomUtils.GetBytes(Byte[] output)
at NBitcoin.Key..ctor(Boolean fCompressedIn)
at NBitcoin.Key..ctor()
at TestInstallNBitcoin.MainPage..ctor()
at TestInstallNBitcoin.TestInstallNBitcoin_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at TestInstallNBitcoin.TestInstallNBitcoin_XamlTypeInfo.XamlUserType.ActivateInstance()
at Windows.UI.Xaml.Controls.Fra
The issue was that I dropped net452 support for I don't know what reason, but some version of Visual Studio still use this old .net version for new project template. I added back the support, so now you won't get error.
Activity
NicolasDorier commentedon Aug 17, 2015
was it able before ? I can't compile on windows universal so I don't know. What error do you have ? (sorry for the delay)
NicolasDorier commentedon Aug 17, 2015
Can you also try the "NBitcoin For Mono" package ?
quartsystem commentedon Aug 17, 2015
NuGet / Visual Studio 2015 is now able to perform the update to new release(2.1.4.7). All very strange.
The error message was "Unable to find metadata of NBitcoin xxxx".
Thanks anyway for the answer.
NicolasDorier commentedon Aug 18, 2015
By the way, I am interested to know if it the lib works fine on Univeral Project, since I did not tried. Let me know.
I don't think you have access to the Node class (to connect to network) on Universal project, can you confirm ?
If it is a problem for you, you can try NBitcoin For Mono package which include everything and should also works fine on Universal.
quartsystem commentedon Aug 18, 2015
I'm developing a client for Windows 10 in my spare time.
I'll keep you updated on the tests that will.
quartsystem commentedon Aug 21, 2015
On universal Windows (app for Windows 10) NBitcoin.Mono fails installation with NuGet.
With NBitcoin, when launching the following code is generated an exception:
var k = new NBitcoin.Key();
System.InvalidOperationException: You must set the RNG (RandomUtils.Random) before generating random numbers
at NBitcoin.RandomUtils.GetBytes(Byte[] output)
at NBitcoin.Key..ctor(Boolean fCompressedIn)
at NBitcoin.Key..ctor()
at TestInstallNBitcoin.MainPage..ctor()
at TestInstallNBitcoin.TestInstallNBitcoin_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at TestInstallNBitcoin.TestInstallNBitcoin_XamlTypeInfo.XamlUserType.ActivateInstance()
at Windows.UI.Xaml.Controls.Fra
quartsystem commentedon Aug 21, 2015
On Windows 10, PRNG uses the CryptographicBuffer. I solved this code:
To generate the key
NBitcoin.RandomUtils.Random = new CryptographicBufferRandom();
var newKey = new NBitcoin.Key();
NicolasDorier commentedon Aug 22, 2015
thanks, will be useful when I'll make a specific version for universal
GoldNRoll commentedon Aug 1, 2017
Hello,
Any chance this will be solved for Windows 10?
NBitcoin.4.0.0.13
Any code fails with this error:
System.InvalidOperationException: You must set the RNG (RandomUtils.Random) before generating random numbers
using System;
using NBitcoin;
namespace Blockchain
{
class Program
{
static void Main(string[] args)
{
Key privateKey = new Key();
Console.WriteLine("Private Key: {0}", privateKey);
PubKey publicKey = privateKey.PubKey;
Console.WriteLine("Public Key: {0}", publicKey);
}
}
}
Thanks, Alexandru
NicolasDorier commentedon Aug 2, 2017
@GoldNRoll set
RandomUtils.Randomto an instance ofCryptographicBufferRandommade by @quartsystem just above.Windows Universal will soon support .NETStandard 2.0, so it will soon be not needed.
Actually I think this is supported, in fall creator update https://blogs.windows.com/buildingapps/2017/05/19/introducing-xaml-standard-net-standard-2-0/
GoldNRoll commentedon Aug 2, 2017
Perfect, thanks!!
NicolasDorier commentedon Aug 7, 2017
@GoldNRoll sorry I incorrectly diagnotised your problem, turns out you were not using UWP so my response does not apply.
I fixed the problem, now you can reference NBitcoin without the issue.
Someone reported it ProgrammingBlockchain/ProgrammingBlockchain#73
The issue was that I dropped net452 support for I don't know what reason, but some version of Visual Studio still use this old .net version for new project template. I added back the support, so now you won't get error.
GoldNRoll commentedon Aug 7, 2017
Hi Nicolas,
Perfect, I updated NBitcoin to 4.0.0.15 and now it works in console application :)
Visual Studio 2017 fresh install still comes with framework 4.5.2
Thank you!!