Skip to content
apobekiaris edited this page Sep 25, 2020 · 11 revisions

image

image GitHub stars GitHub forks

About

The Xpand.XAF.ModelEditor package contains a standalone version of XAF Model Editor, designed to integrate with Visual Studio, Rider, Explorer as standalone without any dependency to eXpandFramework packages. ALternatively you can use the VSIX package where the XpandModelEditor is embedded as described in VSIX integration section.

VSIX integration

Having installed the VSIX package (available in the releases page) you will also get the XpandModelEditor as it is embedded and there is no need to install anything else.

In the VSIX ModelEditor integration there is an extra tool, the XAF Solution Model List which is very useful when you work in VS with large projects as it uses a grid to allow fast navigation. In addition can open extra models and not only the XAF default ones. Bellow you see the AllModules.sln which contains all the modules of the main framework with some custom filter applied .w.

image

The XAF Solution Model List in some systems may have transparency issues. To fix it uncheck the VS Menu/Options/Environment/General/Optimize Rendering...

Next you will get instructions on how to use the XpandModelEditor with Rider or Visual Studio or Explorer without the VSIX.

Installation

Use the Package Manager, or the next command to one of your projects in your solution.

Install-Package Xpand.XAF.ModelEditor

Requirements

  1. DevExpress or eXpandFramework installation is optional.
  2. Visual Studio integration is done once however requires manual effort.
  3. Rider integration is fully automated.
  4. There is no need to install the package to more than one project in your solution or to update it if you add/remove projects.
  5. The package is version agnostic in regards to DevExpress version, meaning you do not have to update when you change your DevExpress version.
  6. There is no need to have Visual Studio installed if you only use Rider but dotnet core should be installed.

How it works

Xpand.XAF.ModelEditor package is distributed from nuget.org as a Nuget package. After each build it will detect the used DevExpress version and will download the required DevExpress dependencies from your system feeds. So if you already have DevExpress installed there is no need for extra configuration. If not just make sure you add a feed to Nuget.config that points to valid DevExpress packages (local or remote). Subsequent builds won't download or check those dependencies but they will modify the solution bootstrappers if needed e.g. a new project added to the solution.

All downloaded dependencies for each XAF version remain inside the package installation folder under the ModelerLibDownloader\bin directory.

If it fails to detect the DevExpress version used due to either indirect references or another way of package reference configuration, then you can force by using the DevExpressVersion msbuild property.

TroubleShooting

  1. The work is done on each build so start from a clean build.
  2. If previous step did not work delete the Nuget package from your nuget cache and try again.
  3. You still have problems then enable logging by either setting the Environmental variable ModelEditorVerbose to 1 or the same MSBuild property to true. This will generate an execution.log inside the package directory, provide it to support with as much details as possible over the usage context..
  4. For support, feedback etc. use the main project issues.

GitHub issues by-label GitHub close issues

Rider installation

Rider installation is ready to go without any additional steps. The Xpand.XAF.ModelEditor creates an external tool in your Settings/Custom tools.

image

and a menu entry in the solution explorer context menu which is shown only for xafml files. image If you prefer to work with Rider without having installed DevExpress consider the following cmdlets from the XpandPwsh module:

  1. Start-XpandProjectConverter
  2. New-XafProject

Visual Studio installation

  1. Create a custom tool from your VS Tools/External Tools menu as shown:

    image

    Argumens: /Q /D /E:OFF /C "$(ProjectDir)Xpand.XAF.ModelEditor.bat"

  2. Create a solution context menu entry following the next steps:

Go to your VS Tools -> Customize ... -> Commands -> Context Menu -> Project and Solution Context Menus | Item menu

image

Choose either Open or Add Command and the Tools and select the command that matches the index of your External tool you created previously.

image

The context entry should now be visible.

image