Closed Chubby-Chocobo closed 6 years ago
Try the latest version of compiler: https://github.com/neo-project/neo-compiler
I've tried the latest version of compiler, but the error still occurs.
@lightszero Can you check this?
you need to find a mscorlib.dll from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework and copy it to where Neo.SmartContract.Framework.dll and .avm is.
@lightszero Thanks for your suggest, but the error still occurs in my case.
I tried to copy dll and pdb files of ICO_Template project to the same folder with neon.exe
, then run neon ICO_Template.dll
there and got the avm file finally.
I deployed that contract to testnet, but it seems there's no new asset is registered. Is there's any guide/documents about how to use this ICO_Template project correctly, and how to make an ICO like Aphelion? Could you please give me some guide/advice @erikzhang Or is there a forum/community for NEO developers that I can look for help there? Many thanks,
Try copy mscorlib.dll to you directory C:\workspace\examples-csharp\ICO_Template\bin\Debug\
Any instruction for Mac users given the full-fledged .NET Framework doesn't support macOS? @tanZiWen tan
I'm also on mac.
got this error when I am trying to compile ICO_Template.dll
LoadModule Error:System.Exception: can't parese event type from:System.Action`3<System.Byte[],System.Byte[],System.Numerics.BigInteger>.maybe it is System.Action<xxx> which is defined in mscorlib.dll,copy this dll in.
at Neo.Compiler.MSIL.ILField..ctor(ILType type, FieldDefinition field) in /Users/xxxx/xxxx/neo-compiler-master/neon/MSIL/ILModule.cs:line 127
at Neo.Compiler.MSIL.ILType..ctor(ILModule module, TypeDefinition type) in /Users/xxxx/xxxx/neo-compiler-master/neon/MSIL/ILModule.cs:line 73
at Neo.Compiler.MSIL.ILModule.LoadModule(Stream dllStream, Stream pdbStream) in /Users/apisit/Downloads/neo-compiler-master/neon/MSIL/ILModule.cs:line 48
at Neo.Compiler.Program.Main(String[] args) in /Users/xxxx/xxxx/neo-compiler-master/neon/Program.cs:line 71
I tried copying mscorlib.dll
into where ICO_Template.dll
is located but doesn't seem to help.
I was able to compile the simple HelloWorld just fine.
I finally have this solved.
this is the updated code for ICO_Template.cs
public delegate void MyAction<T, T1>(T p0, T1 p1);
public delegate void MyAction<T, T1, T2>(T p0, T1 p1, T2 p2);
[DisplayName("transfer")]
public static event MyAction<byte[], byte[], BigInteger> Transferred;
[DisplayName("refund")]
public static event MyAction<byte[], BigInteger> Refund;
big thanks to jianying li(a coder)
on discord. kindly help me debug this.
It's about System.Action
that is defined in mscorlib.dll
on windows but in mono
it's maybe in somewhere else. making neon.dll
unable to find it.
So if you write a smart contract in C# on mac. do not use System.Action
I've also documented the problem (and solution) here ...with some step by step instructions: https://github.com/mwherman2000/neo-windocs/blob/master/windocs/neo-problems/ICO-Template-Problems.md
Hi, Copying mscorlib.dll to debug or release folder is not a straight forward solution. Add mscorlib.dll into solution and in property of the added file, set "Copy to Output Directory" to "Copy always"
worked with me.
Some above workaround helps.
To whom it may concern, I checked out repos at the latest commit
3544cc42d4c9c8f868ce22dca51f83af0fccf744
When building ICO_Template project this error occurs:My system specs:
Could you please take a look into this issue?
One more thing, I'm new in NEO world and looking for a tutorial/example to implement an ICO, like https://aphelion.org/ Is there any more detailed example/tutorial for newbie to understand and follow?
Many thanks,