OBSOLETE: Please use the Xpand.XAF.ModelEditor package that contains a standalone version of XAF Model Editor, designed to integrate with Visual Studio, Rider, Explore.
Also coming soon is the Model Editor for .NET Core and .NET Standard Projects. Read the announcement here.
If you’ve unloaded your csproj and take a look you’ve seen how cumbersome they can be and you must probably know how much simpler, leaner the new sdk project is. In Hanselman words:
“It lets you manage all project dependencies in one place and gives you and uncluttered view of top-level dependencies.”
And that statement above it is crucial for a smooth CI/CD flow.
We also won’t be needing to have DevExpress assemblies installed in the GAC we could use Nugets and have our projects in as many different versions as we want.
One really neat tool that help you with the migration is CsprojToVs2017 or if you prefer to do it manually you can follow this post.
As great as I believe the new sdk project is, it comes with a few disadvantages. The main one being all designers stop to work.
I did a small survey in our Facebook Group:
And I know, it is a really small sample size but at least it confirmed my theory: The most crucial is the Model Editor Designer, Controllers we can live with them in code (Actually Manuel Grundner really encourages you to stop using them). Same for Module and the Application Designer.
We know DevExpress is aware of this and most probably they are working to solve it as we speak but what choices do we have meanwhile.
In an attempt to mitigate this issue I created a Visual Studio Extension that check you references find what DX version you are using and open the correct Standalone version of the Model Editor at design time. Make sure the editor exits in: C:\Program Files (x86)\DevExpress v.XX\Components\Tools\eXpressAppFramework\Model Editor\DevExpress.ExpressApp.ModelEditor.vXX.exe
Let’s see it in action:
I am only showing Windows but Web works exactly the same.
You can download it and give it a try here.
What is next:
Now I want to work on Merging the Model with the Module and Module.XXX layers. I am going like crazy through the source code of the DevExpress.ExpressApp.Design and If I am able to achieve this most of my projects will be migrated stat.
One important consideration if you store the Model Differences in the Database:
From the DevExpress Documentation on Model Difference Storage:
“Note that the Model.xafml file content will be loaded to the database once the application is started. Further changes with this file will be ignored if the database record already exists for the shared model differences. To reload settings from Model.xafml, enable the administrative UI and use the Import Shared Model Difference Action (or delete the Shared Model Difference record and restart).”
Just keep that in mind and please let me know your thoughts, any feedback (good and bad) it is greatly appreciate it.
Until next time, XAF out!