New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First page of Bitcoin Addresses throws an error. #73
Comments
it should work... you created a UWP application I suppose ? |
See MetacoSA/NBitcoin#120 either do not created UWP application, or use the fix in the issue, or wait for october. If you did not created a UWP application then this is another bug. Please let me know. |
This is a console application. Same problem in Visual Studio 2015. I'm on Windows 10, maybe that's the problem? Here's the entire application.
|
Oh shit you are right |
fixing it now... not normal |
Ok pushed new version https://www.nuget.org/packages/NBitcoin 4.0.0.14 should be indexed by nuget soon, retry soon please. |
Ok tested it, it works. Thanks for reporting! |
Confirmed working, thanks. |
This is still an issue with the recent build (4.1.1.3) and mono. |
strange, are you using a recent version of mono? |
Yes, the latest. It threw the error in a debug session of a console app. Then I ended up here looking for a resolution. It works fine in VS 2017. I just added RandomUtils.Random = new UnsecureRandom(); as a quick fix. |
Do you have a way to find out which DLL mono is using? I would have expected it takes .netstandard2.0 which have the Random... but if it fails it means it takes netstandard1.1 which is very strange. |
Its the .NET Framework version (NETFramework,Version=v4.5) 4.1.1.3. |
but there is no |
Can you tell me in command line what you are doing? |
I pulled it apart a little and found the proper version information:
I think what happened here was that the program was originally made in VS2017, then copied to Xamarin studio and recompiled. |
the program is still using VS2017. |
I'm running Xamarin Studio 6.1.2 on Windows. |
XamarinStudio is an old product that doesn't receive updates anymore. If you use Windows, use VisualStudio, if you use Mac, use VisualStudioForMac (which is based on XamarinStudio's foundation); if you use Linux, use MonoDevelop. |
if you don't develop for mobile apps, use Visual Studio Code and .NET Core instead of Mono. |
I am a dummy. I am following along with the book. In "Bitcoin Address" the chapter gives the following code examples.
Key privateKey = new Key(); // generate a random private key
PubKey publicKey = privateKey.PubKey;
Console.WriteLine(publicKey);
When executed in Visual Studio 2017 against the latest nuget package
new Key();
throws this error: "You must set the RNG (RandomUtils.Random) before generating random numbers"As a dummy, I am not sure what code needs to be added to make the example work.
The text was updated successfully, but these errors were encountered: