Hans Karlsen (talk | contribs) No edit summary |
Hans Karlsen (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
Open the EcoProject1.ecomdl, Delete exeisting content, classes,Views, Actions, then: | Open the EcoProject1.ecomdl, Delete exeisting content, classes,Views, Actions, then: | ||
MDriven tab, Import modlr: | MDriven tab, Import modlr (if you currently have your model in ecomdl do a save as modlr in order to import everything ): | ||
[[File:Switching to VS to access codedress from MDrivenDesigner 1712221271063.png|none|thumb|521x521px]] | [[File:Switching to VS to access codedress from MDrivenDesigner 1712221271063.png|none|thumb|521x521px]] | ||
Are you using NetFramework4.7+ -> install/update nuget packages | Are you using NetFramework4.7+ -> install/update nuget packages |
Revision as of 09:18, 4 April 2024
Start visual studio, create a new project, use Template MDrivenEcoSpaceAndModelProject
Delete EcoSpace and PMP since we only want model.
Open the EcoProject1.ecomdl, Delete exeisting content, classes,Views, Actions, then:
MDriven tab, Import modlr (if you currently have your model in ecomdl do a save as modlr in order to import everything ):
Are you using NetFramework4.7+ -> install/update nuget packages
Are you using .netCore, .net6+ -> Create a .net6 project - move the model file to this project, install nuget packages: MDriven.Interfaces, MDriven.Handles,MDriven.LinqExtender,
Remember to move your <modelname>_AssetsTK into the project, same level as ecomdl file. Build. Then codegen:
From this point forward you use VS to upload.
From this point forward you must press codegen whenever you do anything that effects model structure (classes, associations, statemachines)
From this point forward you must build your project (F5 in VS) prior to upload so that the latest build is used for codedress
Now when you add a Method to a Class and leave the Body(eal) field empty - a stub is generated in c#: