Comments (11)
The point here is to make the smart contract build process as natural and familiar to the C# developer as humanly possible.
from neo-devpack-dotnet.
Quick check in the debugger, ModuleConverter.TryInsertMethod is receiving a null Cecil MethodDefinition instance. ModuleConverter._ConvertCall is failing to resolve the method reference to Neo.SmartContract.Framework.Services.Neo.Storage::Put, but the resolve call is inside a try/catch block that swallows the exception, leading to the null ref exception down the line in TryInsertMethod
from neo-devpack-dotnet.
I make some test.I think it is not a bug.
When we build "dotnet framework" project, the depend dll like Neo.SmartContract.Framework.dll will be copy to same path.
but build "dotnet standard" project,will not copy that file
when we build a "dotnet framework" project we will got
HelloWorld.dll
HelloWorld.pdb
Neo.SmartContract.Framework.dll
3 files
when we build a "dotnet standard" project we will got
HelloWorld.dll
HelloWorld.pdb
2 files
we will got a error when neon build avm because miss file:Neo.SmartContract.Framework.dll
I add a standard project with a neo.smartcontract.framework.dll
https://github.com/neo-project/examples/tree/Branch_helloword_standard/csharp/helloworld_stand
and neon build succ
another way is use “dotnet publish” for netstandard project
from neo-devpack-dotnet.
I will try to make a better error info in this situation.
from neo-devpack-dotnet.
Nice to know it's a simple issue. However, instead of forcing the developer to copy the dependency, can we check the nuget global package folder first? https://docs.microsoft.com/en-us/nuget/Consume-Packages/managing-the-global-packages-and-cache-folders
Also, the .deps.json file will contain the path within the global package folder. For example, on my windows machine the global package folder is C:\Users\harry.nuget\packages. The .deps.json file has the following JSON data in the targets object:
"Neo.SmartContract.Framework/2.9.3": {
"dependencies": {
"NETStandard.Library": "2.0.3"
},
"runtime": {
"lib/netstandard1.6/Neo.SmartContract.Framework.dll": {
"assemblyVersion": "2.9.3.0",
"fileVersion": "2.9.3.0"
}
}
},
Sure enough, the path to the DLL on my machine is "C:\Users\harry.nuget\packages\neo.smartcontract.framework\2.9.3\lib\netstandard1.6\Neo.SmartContract.Framework.dll"
from neo-devpack-dotnet.
@devhawk
use “dotnet publish” for netstandard
from neo-devpack-dotnet.
I think that this is working. Can you check @devhawk ? At least I tested with #131 and it worked fine using .net standard. Thanks.
from neo-devpack-dotnet.
Yes, I was able to compile the hello world contract to NEF from build artifacts alone using master branch of this repo. Can we port this back to master-2.x branch?
from neo-devpack-dotnet.
Which was exactly the change for allow this?
from neo-devpack-dotnet.
@shargon can we port #131 to 2.x?
from neo-devpack-dotnet.
Yes, I will
from neo-devpack-dotnet.
Related Issues (20)
- Bug that static attributes can't be compiled
- Exception happened "RVCount doesn't match with EvaluationStack" when invokefunction claim after deploying Example.SmartContract.NFT example project HOT 3
- Primary constructors in c# 12 not supported
- Move examples to a diferent sln HOT 4
- Error on Tests Neo.Compiler.CSharp.UnitTests
- StoredAttribute default value when integer is not working
- Release workflow doesn't work HOT 2
- Use github packages without user and password HOT 7
- Neo submodule issue HOT 6
- Release workflow may not work HOT 2
- Fix hardcoded version for packing
- Update neo submodule
- TestEngine: Coverage and test current smart contracts
- Allow to compile a cs files without a project
- Avoid reuse the same namespace in devpack HOT 2
- property.SetMethod is null, compilation failed HOT 4
- Can't Compile Neo Burger Contract: '(95,32): error NC3003: Duplicate method key: transfer,4.' HOT 9
- NCCS: Helper.GetPatternType() not supported ByteString and BigInteger HOT 2
- Split Neo.Compiler.CSharp HOT 2
- Neo Smart Contract Templates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-devpack-dotnet.