eXpand icon indicating copy to clipboard operation
eXpand copied to clipboard

Updating model, error "The type initializer for 'Xpand.XAF.Modules.Reactive.ReactiveModuleBase' threw an exception." is raised

Open Dade27 opened this issue 3 years ago โ€ข 6 comments

Hi Tolis, I am upgrading a XAF+eXpand win+web+xpo solution from 18.1.4 to 21.2.5 but I becoming crazy. I decided to create a brand new XAF solution and add eXpandAgnostic nuget package to "Module" project, but I am not able to run successfully "Update model" on the project. Error I have into updating VS output window is:

"------- Updating model differences: Project: C:\Users\david.desidera\source\repos\DXApplicationNETframe\DXApplicationNETframe.Module\DXApplicationNETframe.Module.csproj
Error:
Unable to create an instance of the "Xpand.XAF.Modules.ModelViewInheritance.ModelViewInheritanceModule" type.
Reason: "The type initializer for 'Xpand.XAF.Modules.Reactive.ReactiveModuleBase' threw an exception."
Update failed"

I attached here my test solution: could you please help me to understand where I mistake? Thank you in advance With best regards David Desiderร 

DXApplicationNETframe.zip

Dade27 avatar Feb 11 '22 16:02 Dade27

looks interesting case, however not high priority, heads up that it might take a while

apobekiaris avatar Feb 11 '22 16:02 apobekiaris

I see... but what do you suggest for my case? Here below a few details.

  • current released version (installed on customers' prod. environments) is based on DX18.1.4+Xpand18.1.4.9
  • DevExpress project converter to 21.2.5 works fine
  • I added manually all Xpand nupkg
  • Right click on solution node "Update Module on all projects" command
  • VS raises the error message in "Updating" output window

At the end of April I must release the never version: any suggestions are more then welcome! Thanks David

Dade27 avatar Feb 21 '22 16:02 Dade27

lokos related to #908 so your only option is to recompile the framework and apply the same fix. Your can also go manual without the Update Model command, just open your models make a dummy change and save them, there should be an UnsuableNodes.on path xafml if problems

apobekiaris avatar Feb 21 '22 17:02 apobekiaris

Thanks a lot. I will try and let you the result.

Dade27 avatar Feb 21 '22 17:02 Dade27

Sorry Tolis if I bother you again..... but I am becoming crazy. I attached my Xpand test solution.... in agnostic module.cs if I comment RequiredModuleTypes.Add(typeof(Xpand.ExpressApp.Dashboard.DashboardModule)); no errors during updating model As soon as I uncomment it, I receive "Could not load file or assembly 'Xpand.XAF.Modules.ViewEditMode, Version=4.212.8.0, ......" Image 20220321_190906 XpandApplication.zip

Thank you in advance for any suggestions With best regards David

Dade27 avatar Mar 21 '22 18:03 Dade27

works fine in my side

------- Updating model differences: Project: C:\Work\issues\907\XpandApplication\XpandApplication\XpandApplication.Module\XpandApplication.Module.csproj
Update complete

------- Updating model differences: Project: C:\Work\issues\907\XpandApplication\XpandApplication\XpandApplication.Module.Web\XpandApplication.Module.Web.csproj
Update complete

------- Updating model differences: Project: C:\Work\issues\907\XpandApplication\XpandApplication\XpandApplication.Web\XpandApplication.Web.csproj
Update complete

------- Updating model differences: Project: C:\Work\issues\907\XpandApplication\XpandApplication\XpandApplication.Module.Win\XpandApplication.Module.Win.csproj
Update complete

------- Updating model differences: Project: C:\Work\issues\907\XpandApplication\XpandApplication\XpandApplication.Win\XpandApplication.Win.csproj
Update complete

  1. I open the solution
  2. run projectconverter as prompted for 21.2.6
  3. Hit F5 and same exception thown however it clearly states about a missing dependecy to System.Text.Json 5. I install that package in the agnostic module and F5 again with success. Next I tried the Update Model command

apobekiaris avatar Mar 22 '22 03:03 apobekiaris

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.

expand avatar Jan 21 '24 21:01 expand