Skip to content
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

Naming conflicts when trying to use Nethereum in unity #8

Open
Skyway666 opened this issue Jul 10, 2020 · 0 comments
Open

Naming conflicts when trying to use Nethereum in unity #8

Skyway666 opened this issue Jul 10, 2020 · 0 comments

Comments

@Skyway666
Copy link

Skyway666 commented Jul 10, 2020

Naming conflicts

Hi! I'm trying to implement Nethereum into the latest version of Unity (2019.4.3f1), and I'm having trouble with what seems to be naming conflicts.

I have downloaded and included the unity35dlls from the latest build when they where uploaded (there are some later releases but they only contain the source code and I'm clueless about how to compile it myself).

As soon as I plugged in the dlls, I had an error related with the "Task" object, which could be found in the dlls as well as a file of the TextMeshPro plugin. I was able to solve this by removing the plugin, which by now I don't need.

After that, I was even able to connect to Ganache's local blockchain and retrieve the balance for one of my accounts, which was pretty awesome.

Now, the problem comes when I want to interact with my contracts. I am using the Visual Studio solidity plugin to automatically generate the files that define my smart contract in C# for the Nethereum library. However, I get similar naming conflicts with "netstandard" both in the TokenService.cs (Task object) and the TokenDefinition.cs (BigInteger object).

Gravedad	Código	Descripción	Proyecto	Archivo	Línea	Estado suprimido
Error	CS0433	El tipo 'BigInteger' existe en 'Nethereum.Hex, Version=3.5.0.0, Culture=neutral, PublicKeyToken=null' y en 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'	Assembly-CSharp	C:\Users\Gaming\Documents\GitHub\DungeonDome\SmartContract Proof of Concept\Assets\Nethereum\ContractSetup\DDTokenDefinition.cs	37	Activo

Excuse me for uploading the error code in spanish, if it is not understandable I can try to change visual studio's language...

On top of that, the generated files require the Nethereum.Web3 code to work, and it is not included in the unity35dlls. I downloaded the full Nethereum library and included it, I wonder if it is correct.

Conclusion

Is there any workaround for this? I'm not very knowledgeable when it comes to C# standalone projects, I have only used it to interact with Unity, so I would appreciate if you pointed me to some documentation if the solution requires it.

I'm thinking I could try to remove whatever "netstandard" is, I don't think I will be using it for now, however I don't know if there are any dependencices in the unity engine itself or even how to do it.

I could also use a oldest version of unity. if I need to do so, please point me the latest one supported by the Nethereum library.

Thank you very much, I look forward to developing my project using Nethereum to connect to the blockchain, it is looking great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant