Nethereum / Nethereum.Unity

Nethereum.Unity 472/Netstandard package
MIT License
6 stars 3 forks source link

NBitcoin references strong named Newtonsoft.Json Assembly references: 11.0.0.0 Found in project: 13.0.0.0 #2

Closed abuffie closed 4 months ago

abuffie commented 11 months ago

I tried to rebuild the package locally to correct the missing meta files issue and ran into a new error. Unity version 2021.3.5f1

Assembly 'Packages/com.nethereum/Runtime/NBitcoin.dll' will not be loaded due to errors: NBitcoin references strong named Newtonsoft.Json Assembly references: 11.0.0.0 Found in project: 13.0.0.0. Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"

fakkoweb commented 10 months ago

I have the same issue. I cannot downgrade Newtonsoft.Json in my project, so cannot go around this.

abuffie commented 10 months ago

I was actually able to get around the issue with a custom package that I included the correct version of Newtonsoft. I had to build out a few scripts to share between 2 projects which required Newtonsoft so I add the same version into my custom package and it seemed to correct the issue.

I don't have details on it in front of me but that is one place to start on trying to get a work around, look at making your own custom package with the correct version.

fakkoweb commented 10 months ago

I was actually able to get around the issue with a custom package that I included the correct version of Newtonsoft. I had to build out a few scripts to share between 2 projects which required Newtonsoft so I add the same version into my custom package and it seemed to correct the issue.

I don't have details on it in front of me but that is one place to start on trying to get a work around, look at making your own custom package with the correct version.

Are you saying you recreated this Unity package from scratch by rebuilding it yourself? Or are you saying something else?

If it is the first one, how can I compile it with my own version?

abuffie commented 10 months ago

No it was a custom package for consuming complex json which required something more advanced then unity's json parser.

It consisted of a few classes for the json structures and then the version of Newtonsoft the Netereum needed.

fakkoweb commented 10 months ago

No it was a custom package for consuming complex json which required something more advanced then unity's json parser.

It consisted of a few classes for the json structures and then the version of Newtonsoft the Netereum needed.

Can you describe your solution? I currently already have a different NJ version. And the Bitcoindll wants a different version. To solve this, i would need to rebuild the BitCoindll so that it links to my version.

Instead, how exactly did you solve it? I still have not understood your process.

abuffie commented 10 months ago

@fakkoweb I just did some testing and think I have a easy solution, give this a try Once you import the Nethereum package Uncheck every "Validate References" on each .dll , don't forget to apply the change and hopefully you should be good. neth

juanfranblanco commented 4 months ago

This is solved in the latest

skibitsky commented 4 months ago

This is solved in the latest

It's not

https://github.com/Nethereum/Nethereum.Unity/blob/main/Runtime/NBitcoin.dll.meta#L12C3