Open otakuinny opened 6 years ago
Which framework are you targeting?
I have tried creating a new WalletAddress with a .net core and .net 4.7.1 framework This is the code
Tron.Net.Client.WalletAddress newAddress = Tron.Net.Client.WalletAddress.MainNetWalletAddress();
Console.WriteLine(newAddress.IsMainNet);
All the dependencies where correctly installed in both projects, from command line:
install-package Tron.Net.Client
Hello. My project is targeting .Net 4.5 Framework. I first installed the Tron.Net.Protocol from the following NuGet command Install-Package Tron.Net.Protocol -Version 1.2.2
And then Tron.Net.Client from the following NuGet command Install-Package Tron.Net.Client -Version 0.6.3
I could use all the other methods just fine. Only the following code is giving me trouble Tron.Net.Client.WalletAddress newAddress = Tron.Net.Client.WalletAddress.MainNetWalletAddress(); Console.WriteLine(Tron.Net.Common.Utils.ToHexString(newAddress.Value));
Hello. I changed my project target to 4.7.1 and I'm still receiving the following error. Tron.Net.Client.WalletAddress newAddress = Tron.Net.Client.WalletAddress.MainNetWalletAddress(); Console.WriteLine(Tron.Net.Common.Utils.ToHexString(newAddress.Value));
Error: The type initializer for ‘Tron.Net.Crypto.ECKey’ threw an exception. at Tron.Net.Crypto.ECKey..ctor() at Tron.Net.Client.WalletAddress.MainNetWalletAddress(ECKey key) at TelegramBot.TRON.TRON.TestTRON() in ………
I've tried with several .net frameworks starting at .net4.5 all the way to .net 4.7.2. It is the same error Tron.Net.Client.WalletAddress newAddress = Tron.Net.Client.WalletAddress.MainNetWalletAddress(); Console.WriteLine(Tron.Net.Common.Utils.ToHexString(newAddress.Value));
Error: The type initializer for ‘Tron.Net.Crypto.ECKey’ threw an exception. at Tron.Net.Crypto.ECKey..ctor() at Tron.Net.Client.WalletAddress.MainNetWalletAddress(ECKey key) at TelegramBot.TRON.TRON.TestTRON() in ………
Here are the references. The target framework is 4.7.1
hi
i'm using .net core3.1
WalletAddress address = Tron.Net.Client.WalletAddress.MainNetWalletAddress(); string privateKey = Tron.Net.Common.Utils.ToHexString(address.Value);
and then !
FileNotFoundException: Could not load file or assembly 'Tron.Net.Crypto, Version=0.7.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
Hello. I installed the Tron.Net.Client library from the following URL https://www.nuget.org/packages/Tron.Net.Client
The following line is throwing an error. Tron.Net.Client.WalletAddress newAddress = Tron.Net.Client.WalletAddress.MainNetWalletAddress();
Error: The type initializer for ‘Tron.Net.Crypto.ECKey’ threw an exception. at Tron.Net.Crypto.ECKey..ctor() at Tron.Net.Client.WalletAddress.MainNetWalletAddress(ECKey key) at TelegramBot.TRON.TRON.TestTRON() in ………
Also, the lib BouncyCastle.Crypto wasn't included in the above nuget pakage.
Thanks for your help.