NMFCode / NMF

This repository contains the entire code for the .NET Modeling Framework
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

Problem following tutorial with NMF version 2.0.176 #67

Closed Philippe-Laval closed 1 year ago

Philippe-Laval commented 1 year ago

Hello,

I am trying to follow this tutorial, "First Steps with the .NET Modeling Framework" https://www.youtube.com/watch?v=NIMYuwTltVs

I took the fsm.ecore file here : https://github.com/NMFCode/NMFDemo

PM> Ecore2Code -f -n NMFDemo2 -o Metamodel -m fsm.nmf fsm.ecore An error occurred reading the Ecore file. The error message was: La r‚f‚rence d'objet n'est pas d‚finie … une instance d'un objet. No package could be found.

The problem can be reproduced with a console app (.net core or .net 4.8 framework) with NMF version 2.0.176

Philippe-Laval commented 1 year ago

Using the project found at https://github.com/NMFCode/NMFDemo which depends on NMF version 1.0.3

I can run the command : Ecore2Code -f -n NMFDemo.Metamodels -o Metamodels\FSM -m fsm.nmf fsm.ecore

which generates the proper code for the example to run properly (whne you include file Example.fsm in the project and copy the file to output folder with an action).

georghinkel commented 1 year ago

Hi Philippe,

sorry, I just changed to the university and did not update my email address so far, that's why I am only coming back to you now.

I can at least confirm that this is a bug, will investigate it as soon as possible.

Best,

Georg

Philippe-Laval commented 1 year ago

Thanks for the answer. I think your project deserve to get some documentation and some examples of usage (starting a begineer level and then medium level - your are an expert). It is very difficult to find a project in the MDE fields developped in C#. I have ported some code from java from another project and will post it (it was more simple for me to follow it).

georghinkel commented 1 year ago

The problem here is that it is not a code problem. If I run Ecore2Code through the package manager console, it gives me that null reference exception. When I start it in dev, it succeeds. So I guess there is something odd going on. Maybe you could try installing the code generator as a global tool. This executes the same code but as a .NET Core 3.1 app instead of .NET Framework 4.6.1. I guess it is time to migrate that to .NET 6...

The issue with documentation is, I somehow left this project when I finished my PhD and left to industry. Now, I am back to academia and thus hope to have some more time to work on it, but there is a bit of onboarding first.

georghinkel commented 1 year ago

I updated the demo project now and tried out everything through the NuGet packages. The code generation runs without any error message, so I am closing this issue.

georghinkel commented 1 year ago

BTW, in terms of documentation, I hope you are aware of this website: https://nmfcode.github.io/NMFdocs/index.html

I know that it does not have that much information and primarily focuses on API documentation, but I would like to invite you to raise an issue in the documentation repo if there is something specific where you would like to see more documentation.